Ensure the ansible facts are available

This commit is contained in:
Jakub Jelen 2022-04-12 21:17:44 +02:00 committed by Jakub Jelen
parent bd64ca7441
commit e24ff31d2a
3 changed files with 17 additions and 4 deletions

View file

@ -1,3 +1,9 @@
--- ---
- name: Ensure ansible_facts used by role
setup:
gather_subset: min
when: not ansible_facts.keys() | list |
intersect(__sshd_required_facts) == __sshd_required_facts
- name: Include common vars - name: Include common vars
include_vars: vars/common.yml include_vars: vars/common.yml

View file

@ -1,7 +1,9 @@
--- ---
- name: Set common variables and ensure basic facts are gathered
include_tasks: set_common_vars.yml
- include_tasks: set_common_vars.yml - name: Set platform/version specific variables
include_tasks: variables.yml
- include_tasks: variables.yml - name: Execute the actual role tasks
include_tasks: install.yml
- include_tasks: install.yml

View file

@ -9,3 +9,8 @@ __sshd_hostkey_mode: "0600"
__sshd_compat_match_all: Match all __sshd_compat_match_all: Match all
# The hostkeys not supported in FIPS mode, if applicable # The hostkeys not supported in FIPS mode, if applicable
__sshd_hostkeys_nofips: [] __sshd_hostkeys_nofips: []
__sshd_required_facts:
- distribution
- distribution_major_version
- os_family