Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gather required facts if relevant keys in ansible_facts are missing #1102

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions roles/ipaclient/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
---
# tasks file for ipaclient

- name: Gather facts
ansible.builtin.setup:
gather_subset: min
when: ansible_facts.distribution is not defined or
ansible_facts.distribution_version is not defined or
ansible_facts.distribution_major_version is not defined or
ansible_facts.os_family is not defined

- name: Import variables specific to distribution
ansible.builtin.include_vars: "{{ item }}"
with_first_found:
Expand Down
8 changes: 8 additions & 0 deletions roles/ipareplica/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
---
# tasks file for ipareplica

- name: Gather facts
ansible.builtin.setup:
gather_subset: min
when: ansible_facts.distribution is not defined or
ansible_facts.distribution_version is not defined or
ansible_facts.distribution_major_version is not defined or
ansible_facts.os_family is not defined

- name: Import variables specific to distribution
ansible.builtin.include_vars: "{{ item }}"
with_first_found:
Expand Down
8 changes: 8 additions & 0 deletions roles/ipaserver/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
---
# tasks file for ipaserver

- name: Gather facts
ansible.builtin.setup:
gather_subset: min
when: ansible_facts.distribution is not defined or
ansible_facts.distribution_version is not defined or
ansible_facts.distribution_major_version is not defined or
ansible_facts.os_family is not defined

- name: Import variables specific to distribution
ansible.builtin.include_vars: "{{ item }}"
with_first_found:
Expand Down
8 changes: 8 additions & 0 deletions roles/ipasmartcard_client/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
msg: "Uninstalling smartcard for IPA is not supported"
when: state|default('present') == 'absent'

- name: Gather facts
ansible.builtin.setup:
gather_subset: min
when: ansible_facts.distribution is not defined or
ansible_facts.distribution_version is not defined or
ansible_facts.distribution_major_version is not defined or
ansible_facts.os_family is not defined

- name: Import variables specific to distribution
ansible.builtin.include_vars: "{{ item }}"
with_first_found:
Expand Down
8 changes: 8 additions & 0 deletions roles/ipasmartcard_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
msg: "Uninstalling smartcard for IPA is not supported"
when: state|default('present') == 'absent'

- name: Gather facts
ansible.builtin.setup:
gather_subset: min
when: ansible_facts.distribution is not defined or
ansible_facts.distribution_version is not defined or
ansible_facts.distribution_major_version is not defined or
ansible_facts.os_family is not defined

- name: Import variables specific to distribution
ansible.builtin.include_vars: "{{ item }}"
with_first_found:
Expand Down