Skip to content

Commit

Permalink
depolyment roles: Allow deployment without gather_facts
Browse files Browse the repository at this point in the history
When using the deployment roles, some facts about the target node
distribution are required, but using 'gather_facts: true' takes a long
time as it probes for a lot of facts which are not used by the
deployment roles.

By restricting the facts loaded to the ones that are used, there's a
reduction in the deployment tasks, as there's less data to be probed
before the role is executed.
  • Loading branch information
rjeffman committed Feb 6, 2024
1 parent 4321478 commit 0318373
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions roles/ipaclient/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
---
# tasks file for ipaclient

- name: Ensure distribution facts are available
ansible.builtin.setup:
gather_subset:
- dns
- distribution
- distribution_version
- distribution_major_version
- os_family

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

- name: Ensure distribution facts are available
ansible.builtin.setup:
gather_subset:
- dns
- distribution
- distribution_version
- distribution_major_version
- os_family

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

- name: Ensure distribution facts are available
ansible.builtin.setup:
gather_subset:
- dns
- distribution
- distribution_version
- distribution_major_version
- os_family

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

0 comments on commit 0318373

Please sign in to comment.