From 180b105b21e5a259241cab354bcb661da27ca6e1 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Fri, 6 Feb 2015 23:02:44 -0500 Subject: [PATCH] Add missing ch08 files --- ch08/README.md | 6 ++++++ ch08/playbooks/group_vars/all | 3 +++ ch08/playbooks/roles/database/tasks/main.yml | 12 ++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 ch08/README.md create mode 100644 ch08/playbooks/group_vars/all 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 }}" -- 2.44.0