we have vault 1.21.3 installed and the role keeps failing because it trys to install 1.21.2 which means downgrade.
Could you add the possibility to just check what version is installed and skip the update steps if the release version is idendical or newer?
11:09:21 AM
TASK [ansible-vault : Install Vault package vault=1.21.2-1] ********************
11:09:21 AM
[ERROR]: Task failed: Module failed: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" -o DPkg::Lock::Timeout=60 install 'vault=1.21.2-1'' failed: E: Packages were downgraded and -y was used without --allow-downgrades.
11:09:21 AM
11:09:21 AM
Origin: /tmp/semaphore/project_1/repository_2_template_30/roles/ansible-vault/tasks/install_hashi_repo.yml:83:3
11:09:21 AM
11:09:21 AM
81 become: true
11:09:21 AM
82
11:09:21 AM
83 - name: "Install Vault package {{ _vault_repo_pkg }}"
11:09:21 AM
^ column 3
11:09:21 AM
11:09:21 AM
fatal: [myvault]: FAILED! => {"cache_update_time": 1770977357, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" -o DPkg::Lock::Timeout=60 install 'vault=1.21.2-1'' failed: E: Packages were downgraded and -y was used without --allow-downgrades.\n", "rc": 100, "stderr": "E: Packages were downgraded and -y was used without --allow-downgrades.\n", "stderr_lines": ["E: Packages were downgraded and -y was used without --allow-downgrades."], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following packages will be DOWNGRADED:\n vault\n0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following packages will be DOWNGRADED:", " vault", "0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded."]}
Hi guys,
we have vault 1.21.3 installed and the role keeps failing because it trys to install 1.21.2 which means downgrade.
Could you add the possibility to just check what version is installed and skip the update steps if the release version is idendical or newer?
Here the part of the log: