forked from Demonware/postgresql
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathprepare.yml
More file actions
39 lines (33 loc) · 976 Bytes
/
Copy pathprepare.yml
File metadata and controls
39 lines (33 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
- name: Prepare
hosts: pgcluster
gather_facts: no
become: yes
pre_tasks:
- name: Wait for SSH
ansible.builtin.wait_for_connection:
- name: Gather facts for the first time
ansible.builtin.setup:
- name: Install python dependencies
ansible.builtin.apt:
name:
- python3-apt
update_cache: yes
- name: Use python3 by default
community.general.system.alternatives:
path: /usr/bin/python3
link: /usr/bin/python
name: python
priority: 1
- name: Build hosts file
ansible.builtin.lineinfile:
path: /etc/hosts
regexp: '.*{{ item }}$'
line: "{{ hostvars[item].ansible_eth1.ipv4.address }} {{ item }}"
state: present
mode: 0644
when: hostvars[item].ansible_eth1.ipv4.address is defined
loop: "{{ groups[repmgr_target_group] }}"
- name: Install acl package
ansible.builtin.apt:
name: acl