forked from mbukatov/ocp-network-split
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmultisetup-netsplit.yml
61 lines (56 loc) · 1.48 KB
/
multisetup-netsplit.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
- name: core netsplit setup
hosts: all
remote_user: root
tags:
- netsplit
handlers:
- name: daemon-reload
ansible.builtin.systemd:
daemon_reload: true
tasks:
- name: Check that env_file is specified
assert:
that:
- env_file is defined
fail_msg: "you need specify env_file genered by ocp-network-split-multisetup tool"
- name: Install dependencies for netsplit setup
dnf:
name: iptables
state: present
- name: Copy network-split.env file
copy:
src: "{{ env_file }}"
dest: "/etc/network-split.env"
owner: root
group: root
tags:
- env-file
- name: Copy netsplit scripts
copy:
src: "ocpnetsplit/{{ item }}"
dest: "/etc/{{ item }}"
owner: root
group: root
mode: 0544
with_items:
- network-zone.sh
- network-split.sh
- name: Copy netsplit unit files
copy:
src: "ocpnetsplit/systemd/{{ item }}"
dest: "/etc/systemd/system/{{ item }}"
owner: root
group: root
with_items:
- network-split-teardown.service
notify:
- daemon-reload