diff --git a/playbooks/setup_database.yml b/playbooks/setup_database.yml new file mode 100644 index 0000000..3c27194 --- /dev/null +++ b/playbooks/setup_database.yml @@ -0,0 +1,19 @@ +--- +- name: This playbook installs and setups postgresql + hosts: aws + become: true + tasks: + - name: install postgresql + apt: + name: postgresql + update_cache: true + + - name: enable the postgresql service + service: + name: postgresql + enabled: true + + - name: start the postgresql service + service: + name: postgresql + state: started