saltyorg / Saltbox

Ansible-based solution for rapidly deploying a Docker containerized cloud media server.
https://docs.saltbox.dev
GNU General Public License v3.0
571 stars 65 forks source link

Sanity check for ansible upgradability fails preventing any other tag to run #80

Closed kid-pro-kuo closed 2 years ago

kid-pro-kuo commented 2 years ago

Describe the bug Whenever I run the install tag, the process exits at the ansible version sanity check saying it has been updated and to re-run the previous tag. However, it doesn't look like ansible gets upgraded at all resulting in all tags exiting at the same process.

I think there's an error in the version requirements and/or ansible update instructions (see attachedl logs)

To Reproduce Steps to reproduce the behavior:

  1. Run any install tag, e.g. sb install saltbox
  2. Wait for process to exit

Expected behavior Sanity checks to pass and proceed with desired script run

Screenshots TASK [sanity_check : Print Ansible version] **** Thursday 23 June 2022 02:06:32 +0200 (0:00:00.222) 0:00:03.727 ***** ok: [localhost] => { "msg": [ "Installed Ansible version: 5.9.0.", "Installed Ansible Core version: 2.12.6." ] }

TASK [sanity_check : Check if Ansible needs upgrading] ***** Thursday 23 June 2022 02:06:32 +0200 (0:00:00.057) 0:00:03.784 * ok: [localhost]

TASK [sanity_check : Upgrade Ansible] ** Thursday 23 June 2022 02:06:32 +0200 (0:00:00.068) 0:00:03.852 ***** changed: [localhost]

TASK [sanity_check : Upgrade Ansible | Print Instructions] ***** Thursday 23 June 2022 02:07:46 +0200 (0:01:13.587) 0:01:17.440 * ok: [localhost] => { "msg": [ "Ansible was upgraded", "You will need to re-run your previous tag." ] }

TASK [sanity_check : Upgrade Ansible | Exit] *** Thursday 23 June 2022 02:07:46 +0200 (0:00:00.052) 0:01:17.493 *

Logs From ansible-update.log: Found existing installation: ansible 5.9.0 Uninstalling ansible-5.9.0: Successfully uninstalled ansible-5.9.0 WARNING: Skipping ansible-base as it is not installed. WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Collecting ansible<6.0.0,>=5.0.0 Downloading ansible-5.9.0.tar.gz (36.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 36.8/36.8 MB 115.7 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Requirement already satisfied: ansible-core~=2.12.6 in /usr/local/lib/python3.8/dist-packages (from ansible<6.0.0,>=5.0.0) (2.12.6) Requirement already satisfied: cryptography in /usr/local/lib/python3.8/dist-packages (from ansible-core~=2.12.6->ansible<6.0.0,>=5.0.0) (36.0.2) Requirement already satisfied: packaging in /usr/local/lib/python3.8/dist-packages (from ansible-core~=2.12.6->ansible<6.0.0,>=5.0.0) (21.3) Requirement already satisfied: resolvelib<0.6.0,>=0.5.3 in /usr/local/lib/python3.8/dist-packages (from ansible-core~=2.12.6->ansible<6.0.0,>=5.0.0) (0.5.4) Requirement already satisfied: jinja2 in /usr/local/lib/python3.8/dist-packages (from ansible-core~=2.12.6->ansible<6.0.0,>=5.0.0) (3.1.2) Requirement already satisfied: PyYAML in /usr/lib/python3/dist-packages (from ansible-core~=2.12.6->ansible<6.0.0,>=5.0.0) (5.3.1) Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.8/dist-packages (from cryptography->ansible-core~=2.12.6->ansible<6.0.0,>=5.0.0) (1.15.0) Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.8/dist-packages (from jinja2->ansible-core~=2.12.6->ansible<6.0.0,>=5.0.0) (2.1.1) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.8/dist-packages (from packaging->ansible-core~=2.12.6->ansible<6.0.0,>=5.0.0) (3.0.8) Requirement already satisfied: pycparser in /usr/local/lib/python3.8/dist-packages (from cffi>=1.12->cryptography->ansible-core~=2.12.6->ansible<6.0.0,>=5.0.0) (2.21) Building wheels for collected packages: ansible Building wheel for ansible (setup.py): started Building wheel for ansible (setup.py): finished with status 'done' Created wheel for ansible: filename=ansible-5.9.0-py3-none-any.whl size=64500299 sha256=a3fa853cf7a37d776d94b210b0c281d703b9365315c2ee9b5dc55075a45522a0 Stored in directory: /tmp/pip-ephem-wheel-cache-rtgcr05l/wheels/58/b7/83/adabf45508153903efbbe54dca6a85a30cc0f694ddd6268e7f Successfully built ansible Installing collected packages: ansible Successfully installed ansible-5.9.0

From /home/sebastien/saltbox/roles/sanity_check/defaults/main.yml sanity_check_ansible_version_min: 5.9.0 ansible_update: false

System Information

Additional context

saltydk commented 2 years ago

Should be fixed now, apologies.

saltydk commented 2 years ago

Now it is, forgot to push the fix.

kid-pro-kuo commented 2 years ago

Thank you!