This repository was archived by the owner on Apr 17, 2019. It is now read-only.
File tree 3 files changed +15
-28
lines changed
3 files changed +15
-28
lines changed Original file line number Diff line number Diff line change @@ -6,3 +6,10 @@ bin_dir: /usr/bin
6
6
# The directory used by Ansible to temporarily store
7
7
# files on Ansible managed systems.
8
8
ansible_temp_dir : /tmp/.ansible/files
9
+
10
+ # Some default values that may get modified in etc/tasks/main.yml
11
+ is_atomic : false
12
+ is_coreos : false
13
+ has_rpm : false
14
+ has_firewalld : false
15
+ has_iptables : false
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Determine if Atomic
3
3
stat : path=/run/ostree-booted
4
- register : s
4
+ register : os_tree_check
5
5
changed_when : false
6
6
always_run : yes
7
7
8
- - name : Init the is_atomic fact
9
- set_fact :
10
- is_atomic : false
11
-
12
8
- name : Set the is_atomic fact
13
9
set_fact :
14
10
is_atomic : true
15
- when : s .stat.exists
11
+ when : os_tree_check .stat.exists
16
12
17
13
- name : Determine if CoreOS
18
14
raw : " grep '^NAME=' /etc/os-release | sed s'/NAME=//'"
19
15
register : distro
20
16
always_run : yes
21
17
22
- - name : Init the is_coreos fact
23
- set_fact :
24
- is_coreos : false
25
-
26
18
- name : Set the is_coreos fact
27
19
set_fact :
28
20
is_coreos : true
41
33
42
34
- name : Determine if has rpm
43
35
stat : path=/usr/bin/rpm
44
- register : s
36
+ register : rpm_check
45
37
changed_when : false
46
38
always_run : yes
47
39
48
- - name : Init the has_rpm fact
49
- set_fact :
50
- has_rpm : false
51
-
52
40
- name : Set the has_rpm fact
53
41
set_fact :
54
42
has_rpm : true
55
- when : s.stat.exists
56
-
57
- - name : Init the has_firewalld fact
58
- set_fact :
59
- has_firewalld : false
60
-
61
- - name : Init the has_iptables fact
62
- set_fact :
63
- has_iptables : false
43
+ when : rpm_check.stat.exists
64
44
65
45
# collect information about what packages are installed
66
46
- include : rpm.yml
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : RPM | Determine if firewalld installed
3
3
command : " rpm -q firewalld"
4
- register : s
4
+ register : firewalld_check
5
5
changed_when : false
6
6
failed_when : false
7
7
always_run : yes
8
8
9
9
- name : Set the has_firewalld fact
10
10
set_fact :
11
11
has_firewalld : true
12
- when : s .rc == 0
12
+ when : firewalld_check .rc == 0
13
13
14
14
- name : Determine if iptables-services installed
15
15
command : " rpm -q iptables-services"
16
- register : s
16
+ register : iptables_check
17
17
changed_when : false
18
18
failed_when : false
19
19
always_run : yes
20
20
21
21
- name : Set the has_iptables fact
22
22
set_fact :
23
23
has_iptables : true
24
- when : s .rc == 0
24
+ when : iptables_check .rc == 0
You can’t perform that action at this time.
0 commit comments