Do not attempt to create and verify sysconfig on unrelated systems

This commit is contained in:
Jakub Jelen 2020-11-23 15:24:52 +01:00
parent 48dc56b2d2
commit 425400d521
2 changed files with 4 additions and 3 deletions

View file

@ -19,6 +19,7 @@
backup: "{{ sshd_backup }}"
when:
- sshd_sysconfig|bool
- __sshd_sysconfig_supports_use_strong_rng or __sshd_sysconfig_supports_crypto_policy
notify: reload_sshd
- name: Make sure hostkeys are available and have expected permissions

View file

@ -43,10 +43,10 @@
# these are string variants in default configuration file
- "'SSH_USE_STRONG_RNG=0' not in config.content | b64decode"
- "'# SSH_USE_STRONG_RNG=1' not in config.content | b64decode"
when:
- ansible_facts['os_family'] == "RedHat"
- ansible_facts['distribution'] != 'Fedora'
tags: tests::verify
when:
- ansible_facts['os_family'] == "RedHat"
- ansible_facts['distribution'] != 'Fedora'
- name: "Restore configuration files"
include_tasks: tasks/restore.yml