Skip to content

Commit

Permalink
Merge pull request #1549 from grycap/devel
Browse files Browse the repository at this point in the history
Fix #1548
  • Loading branch information
micafer authored May 2, 2024
2 parents 1c12cf4 + b94c159 commit b83b5cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions IM/ansible_utils/ansible_executor_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,13 @@ def run(self):
# Create a specific dir for the local temp
C.DEFAULT_LOCAL_TMP = tempfile.mkdtemp()

try:
# Initialize the plugin loader for ansible 2.15.0 or higher
from ansible.plugins.loader import init_plugin_loader
init_plugin_loader([])
except ImportError:
pass

result = 0
try:
pb = Playbook.load(self._playbook, variable_manager=self._variable_manager, loader=self._loader)
Expand Down
4 changes: 2 additions & 2 deletions contextualization/conf-ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@

- name: Set Ansible newer version for python 3.12
set_fact:
ANSIBLE_VERSION: 6.7.0
ANSIBLE_VERSION: 8.7.0
when:
- ansible_python_version is version('3.12', '>=')
- ANSIBLE_VERSION is version('6.7.0', '<')
- ANSIBLE_VERSION is version('8.7.0', '<')

- name: Install ansible {{ ANSIBLE_VERSION }} with Pip
pip:
Expand Down

0 comments on commit b83b5cb

Please sign in to comment.