Skip to content

Commit

Permalink
Disable facts by default in ansible.cfg
Browse files Browse the repository at this point in the history
As a continuation of a7f2fa7, this
change switches fact injection to off by default in the provided
ansible.cfg.

Signed-off-by: Alex Schultz <aschultz@redhat.com>
(cherry picked from commit db031a4)
  • Loading branch information
mwhahaha authored and guits committed Mar 25, 2021
1 parent 56aac32 commit 181924d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions ansible.cfg
Expand Up @@ -22,6 +22,7 @@ nocows = 1
callback_whitelist = profile_tasks
stdout_callback = yaml
force_valid_group_names = ignore
inject_facts_as_vars = False

# Disable them in the context of https://review.openstack.org/#/c/469644
retry_files_enabled = False
Expand Down
10 changes: 10 additions & 0 deletions roles/ceph-facts/tasks/facts.yml
Expand Up @@ -19,6 +19,16 @@
discovered_interpreter_python: "{{ ansible_python_interpreter }}"
when: ansible_python_interpreter is defined

# If ansible_python_interpreter is not defined, this can result in the
# discovered_interpreter_python fact from being set. This fails later in this
# playbook and is used elsewhere.
- name: set_fact discovered_interpreter_python if not previously set
set_fact:
discovered_interpreter_python: "{{ ansible_facts['discovered_interpreter_python'] }}"
when:
- discovered_interpreter_python is not defined
- ansible_facts['discovered_interpreter_python'] is defined

# Set ceph_release to ceph_stable by default
- name: set_fact ceph_release ceph_stable_release
set_fact:
Expand Down

0 comments on commit 181924d

Please sign in to comment.