82 lines
1.9 KiB
YAML
82 lines
1.9 KiB
YAML
---
|
|
- hosts: all
|
|
|
|
vars:
|
|
postgresql_global_config_options:
|
|
- option: listen_addresses
|
|
value: "*"
|
|
- option: unix_socket_directories
|
|
value: '{{ postgresql_unix_socket_directories | join(",") }}'
|
|
|
|
postgresql_hba_entries:
|
|
- type: local
|
|
database: all
|
|
user: postgres
|
|
auth_method: peer
|
|
- type: local
|
|
database: all
|
|
user: all
|
|
auth_method: peer
|
|
- type: host
|
|
database: all
|
|
user: all
|
|
address: 127.0.0.1/32
|
|
auth_method: md5
|
|
- type: host
|
|
database: all
|
|
user: all
|
|
address: ::1/128
|
|
auth_method: md5
|
|
- type: host
|
|
database: all
|
|
user: all
|
|
address: 0.0.0.0/0
|
|
auth_method: md5
|
|
|
|
postgresql_databases:
|
|
- name: "{{ db_server_name }}"
|
|
|
|
postgresql_users:
|
|
- name: "{{ db_server_user }}"
|
|
password: "{{ db_server_pass }}"
|
|
|
|
rabbitmq_users:
|
|
- name: "{{ rabbitmq_server_user }}"
|
|
password: "{{ rabbitmq_server_pass }}"
|
|
vhost: "{{ rabbitmq_server_vpath }}"
|
|
configure_priv: .*
|
|
read_priv: .*
|
|
write_priv: .*
|
|
tags: administrator
|
|
|
|
rabbitmq_users_remove: []
|
|
rabbitmq_debian_version: 3.7.23-1
|
|
|
|
redis_bind_interface: 0.0.0.0
|
|
|
|
pre_tasks:
|
|
- name: Update apt cache.
|
|
apt: update_cache=yes cache_valid_time=600
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
roles:
|
|
- geerlingguy.postgresql
|
|
- mrlesmithjr.rabbitmq
|
|
- geerlingguy.redis
|
|
- role_under_test
|
|
|
|
post_tasks:
|
|
- name: Wait for service come up
|
|
shell: sleep 10s
|
|
|
|
- name: Get health check status
|
|
uri:
|
|
url: http://localhost/healthcheck/
|
|
return_content: yes
|
|
validate_certs: no
|
|
register: healthcheck
|
|
|
|
- name: Fail if ture is not in the responce
|
|
fail:
|
|
when: "'true' not in healthcheck.content"
|