1
0
Fork 0
mirror of https://github.com/geerlingguy/ansible-role-postgresql.git synced 2024-11-11 13:50:50 -05:00
postgresql/molecule/default/playbook.yml

36 lines
925 B
YAML
Raw Normal View History

---
2018-09-30 21:23:32 -04:00
- name: Converge
hosts: all
become: true
2016-09-29 15:33:39 -04:00
vars:
postgresql_databases:
- name: example
postgresql_users:
- name: jdoe
pre_tasks:
- name: Update apt cache.
2018-09-30 21:23:32 -04:00
apt: update_cache=true cache_valid_time=600
when: ansible_os_family == 'Debian'
- name: Set custom variables for old CentOS 6 PostgreSQL install.
set_fact:
postgresql_hba_entries: []
postgresql_global_config_options:
- option: unix_socket_directory
value: '{{ postgresql_unix_socket_directories[0] }}'
2018-09-30 21:23:32 -04:00
when:
- ansible_os_family == 'RedHat'
- ansible_distribution_version.split('.')[0] == '6'
roles:
2018-09-30 21:23:32 -04:00
- role: geerlingguy.postgresql
post_tasks:
- name: Verify postgres is running.
command: "{{ postgresql_bin_path }}/pg_ctl -D {{ postgresql_data_dir }} status"
changed_when: false
2018-09-30 21:42:29 -04:00
become: true
become_user: postgres