Skip to content

Commit

Permalink
Ansible-core only requirements for 8+
Browse files Browse the repository at this point in the history
Change req files to only have ansible-core:
- 2.15.* (vs ansible8)
- 2.16.* (vs ansible9)

Change tpaexec to check ansible-core presence instead of ansible
when we look for already installed ansible package during setup
  • Loading branch information
JonathanRenon-EDB committed Mar 4, 2024
1 parent bf766da commit f1e41c4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions bin/tpaexec
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ _install_pip_packages() {

# If we have ansible already installed and we're going to install a different
# one, we must remove the old one first
existing_ansible_version=$(pip3 show ansible | grep Version | awk '{print $2}')
desired_ansible_version=$(grep 'ansible==' $ANSIBLE_REQUIREMENTS|grep -Eo '[[:digit:].]+')
existing_ansible_version=$(pip3 show ansible-core | grep Version | awk '{print $2}')
desired_ansible_version=$(grep 'ansible-core==' $ANSIBLE_REQUIREMENTS|grep -Eo '[[:digit:].]+')

if [[ $existing_ansible_version != $desired_ansible_version ]]; then
pip3 uninstall -y ansible
pip3 uninstall -y ansible-core
fi

pip_args+=(-r "$ANSIBLE_REQUIREMENTS")
Expand Down
4 changes: 2 additions & 2 deletions requirements-ansible-8.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# community ansible dependency list for tpaexec setup
ansible>=8, <9
# ansible-core dependency list for tpaexec setup
ansible-core==2.15.*
4 changes: 2 additions & 2 deletions requirements-ansible-9.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# community ansible dependency list for tpaexec setup
ansible>=9,<10
# ansible-core dependency list for tpaexec setup
ansible-core==2.16.*

0 comments on commit f1e41c4

Please sign in to comment.