From: Lorin Hochstein Date: Sat, 7 Feb 2015 04:02:44 +0000 (-0500) Subject: Add missing ch08 files X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=180b105b21e5a259241cab354bcb661da27ca6e1;p=ansiblebook.git Add missing ch08 files --- diff --git a/ch08/README.md b/ch08/README.md new file mode 100644 index 0000000..7929351 --- /dev/null +++ b/ch08/README.md @@ -0,0 +1,6 @@ +For the scripts in this directory, we use Vagrant's Ansible support to do all of +the provisioning, so you just need to do: + + cd playbooks + vagrant up + diff --git a/ch08/playbooks/group_vars/all b/ch08/playbooks/group_vars/all new file mode 100644 index 0000000..c0642d1 --- /dev/null +++ b/ch08/playbooks/group_vars/all @@ -0,0 +1,3 @@ +mezzanine_proj_name: mezzanine-example +locale: en_US.UTF-8 +database_port: 5432 diff --git a/ch08/playbooks/roles/database/tasks/main.yml b/ch08/playbooks/roles/database/tasks/main.yml index b13fa7e..d8a2e16 100644 --- a/ch08/playbooks/roles/database/tasks/main.yml +++ b/ch08/playbooks/roles/database/tasks/main.yml @@ -6,6 +6,18 @@ - libpq-dev - postgresql - python-psycopg2 +- name: copy configuration file + copy: > + src=postgresql.conf dest=/etc/postgresql/9.3/main/postgresql.conf + owner=postgres group=postgres mode=0644 + sudo: True + notify: restart postgres +- name: copy client authentication configuration file + copy: > + src=pg_hba.conf dest=/etc/postgresql/9.3/main/pg_hba.conf + owner=postgres group=postgres mode=0640 + sudo: True + notify: restart postgres - name: create a user postgresql_user: name: "{{ database_user }}"