This repository was archived by the owner on Dec 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +51
-41
lines changed Expand file tree Collapse file tree 2 files changed +51
-41
lines changed Original file line number Diff line number Diff line change 7
7
ansible_python_interpreter : /usr/bin/python3
8
8
when : ansible_facts.distribution == 'Fedora'
9
9
10
- - package :
11
- name : " {{ packages }}"
12
- state : present
13
- vars :
14
- packages :
10
+ - yum :
11
+ name :
15
12
- openssh-clients
16
13
- openssh-server
17
14
- libselinux-python
15
+ state : present
16
+ update_cache : true
17
+ ignore_errors : true
18
+
19
+ - dnf :
20
+ name :
21
+ - openssh-clients
22
+ - openssh-server
23
+ state : present
24
+ update_cache : true
18
25
ignore_errors : true
19
26
20
- - apt :
21
- name : " {{ packages }}"
22
- state : present
27
+ - apt :
28
+ name :
29
+ - openssh-client
30
+ - openssh-server
31
+ state : present
23
32
update_cache : true
24
- vars :
25
- packages :
26
- - " openssh-client"
27
- - " openssh-server"
28
33
ignore_errors : true
29
34
30
- - file :
31
- path : " /var/run/sshd"
35
+ - file :
36
+ path : " /var/run/sshd"
32
37
state : directory
33
-
34
38
35
- - pacman : name="{{packages}}" state=present update_cache=true
36
- vars :
37
- packages :
39
+ - pacman :
40
+ name :
38
41
- " openssh"
39
42
- " awk"
43
+ state : present
44
+ update_cache : true
40
45
ignore_errors : true
41
46
42
47
- name : create ssh host keys
43
48
command : " ssh-keygen -A"
44
- when : not ((ansible_facts.os_family in ['Oracle Linux', 'RedHat']) and ansible_facts.distribution_major_version < '7') or
49
+ when : not ((ansible_facts.os_family in ['Oracle Linux', 'RedHat']) and ansible_facts.distribution_major_version < '7') or
45
50
ansible_facts.distribution == "Fedora" or
46
51
ansible_facts.distribution == "Amazon"
47
-
48
52
roles :
49
53
- ansible-ssh-hardening
Original file line number Diff line number Diff line change 7
7
ansible_python_interpreter : /usr/bin/python3
8
8
when : ansible_facts.distribution == 'Fedora'
9
9
10
- - package :
11
- name : " {{ packages }}"
12
- state : present
13
- vars :
14
- packages :
10
+ - yum :
11
+ name :
15
12
- openssh-clients
16
13
- openssh-server
17
14
- libselinux-python
15
+ state : present
16
+ update_cache : true
17
+ ignore_errors : true
18
+
19
+ - dnf :
20
+ name :
21
+ - openssh-clients
22
+ - openssh-server
23
+ state : present
24
+ update_cache : true
18
25
ignore_errors : true
19
-
20
- - apt :
21
- name : " {{ packages }}"
22
- state : present
26
+
27
+ - apt :
28
+ name :
29
+ - openssh-client
30
+ - openssh-server
31
+ state : present
23
32
update_cache : true
24
- vars :
25
- packages :
26
- - " openssh-client"
27
- - " openssh-server"
28
33
ignore_errors : true
29
-
30
- - file :
31
- path : " /var/run/sshd"
34
+
35
+ - file :
36
+ path : " /var/run/sshd"
32
37
state : directory
33
-
34
- - pacman : name="{{packages}}" state=present update_cache=true
35
- vars :
36
- packages :
38
+
39
+ - pacman :
40
+ name :
37
41
- " openssh"
38
42
- " awk"
43
+ state : present
44
+ update_cache : true
39
45
ignore_errors : true
40
46
41
47
- name : create ssh host keys
42
48
command : " ssh-keygen -A"
43
- when : not ((ansible_facts.os_family in ['Oracle Linux', 'RedHat']) and ansible_facts.distribution_major_version < '7') or
49
+ when : not ((ansible_facts.os_family in ['Oracle Linux', 'RedHat']) and ansible_facts.distribution_major_version < '7') or
44
50
ansible_facts.distribution == "Fedora" or
45
51
ansible_facts.distribution == "Amazon"
46
52
You can’t perform that action at this time.
0 commit comments