Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Commit e1688e4

Browse files
authored
Merge pull request #279 from kostasns/fix_amazon_build
fix: Amazon linux build
2 parents 07d3917 + 101ec28 commit e1688e4

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

templates/opensshd.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ LogLevel {{ sshd_log_level }}
8787
UseLogin no
8888
{% endif %}
8989
{% if sshd_version is version('7.5', '<') %}
90-
UsePrivilegeSeparation {% if (ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version <= '6') or (ansible_facts.os_family in ['Oracle Linux', 'RedHat'] and ansible_facts.distribution_major_version <= '6') -%}{{ssh_ps53}}{% else %}{{ssh_ps59}}{% endif %}
90+
UsePrivilegeSeparation {% if (ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version <= '6') or (ansible_facts.os_family in ['Oracle Linux', 'RedHat'] and ansible_facts.distribution_major_version <= '6' and not ansible_facts.distribution == 'Amazon') -%}{{ssh_ps53}}{% else %}{{ssh_ps59}}{% endif %}
9191
{% endif %}
9292

9393
LoginGraceTime 30s

tests/default.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
- file: path="/var/run/sshd" state=directory
1818
- name: create ssh host keys
1919
command: "ssh-keygen -A"
20-
when: not ((ansible_facts.os_family in ['Oracle Linux', 'RedHat']) and ansible_facts.distribution_major_version < '7') or ansible_facts.distribution == "Fedora"
20+
when: not ((ansible_facts.os_family in ['Oracle Linux', 'RedHat']) and ansible_facts.distribution_major_version < '7') or
21+
ansible_facts.distribution == "Fedora" or
22+
ansible_facts.distribution == "Amazon"
2123

2224
roles:
2325
- ansible-ssh-hardening

tests/default_custom.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
- file: path="/var/run/sshd" state=directory
1818
- name: create ssh host keys
1919
command: "ssh-keygen -A"
20-
when: not ((ansible_facts.os_family in ['Oracle Linux', 'RedHat']) and ansible_facts.distribution_major_version < '7') or ansible_facts.distribution == "Fedora"
20+
when: not ((ansible_facts.os_family in ['Oracle Linux', 'RedHat']) and ansible_facts.distribution_major_version < '7') or
21+
ansible_facts.distribution == "Fedora" or
22+
ansible_facts.distribution == "Amazon"
2123

2224
roles:
2325
- ansible-ssh-hardening

0 commit comments

Comments
 (0)