diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-08-27 09:50:56 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-08-27 09:50:56 +0200 |
commit | e7073180c18b8bc3d416cf370a8cd9181bccfecf (patch) | |
tree | c33b980dd14a4bd443ea7c7603c61cca20c0cada /ansible/roles/postgresql-server/tasks | |
parent | 3928d6e6d38b7f0c0a00b00ad312cfbcbc3db3ba (diff) | |
download | infra-e7073180c18b8bc3d416cf370a8cd9181bccfecf.tar.gz infra-e7073180c18b8bc3d416cf370a8cd9181bccfecf.tar.bz2 infra-e7073180c18b8bc3d416cf370a8cd9181bccfecf.tar.xz infra-e7073180c18b8bc3d416cf370a8cd9181bccfecf.zip |
o Adding postgresql-server role.
Diffstat (limited to 'ansible/roles/postgresql-server/tasks')
-rw-r--r-- | ansible/roles/postgresql-server/tasks/main.yml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/ansible/roles/postgresql-server/tasks/main.yml b/ansible/roles/postgresql-server/tasks/main.yml new file mode 100644 index 0000000..9f13e53 --- /dev/null +++ b/ansible/roles/postgresql-server/tasks/main.yml @@ -0,0 +1,47 @@ +--- +- name: postgresql-server + tags: + - postgresql-server + block: + - name: Install PostgreSQL APT key + tags: pg + notify: update apt cache + apt_key: + id: ACCC4CF8 + keyserver: keyserver.ubuntu.com + + - name: PostgreSQL APT repository + tags: pg + notify: update apt cache + copy: + dest: /etc/apt/sources.list.d/postgresql.list + content: 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' + +- meta: flush_handlers + +- tags: + - postgresql-server + block: + - name: packages + apt: + name: "{{ item }}" + install_recommends: no + with_items: + - postgresql-10 + - postgresql-client-10 + + - name: Logrotate + copy: + dest: /etc/logrotate.d/postgresql-common + content: | + # Managed by Ansible + /var/log/postgresql/*.log { + daily + dateext + copytruncate + delaycompress + compress + notifempty + missingok + su root root + } |