Skip to content

Latest version of RHEL-like use dnf5, making the assert to fail#269

Open
ceso wants to merge 139 commits into
gantsign:masterfrom
ceso:master
Open

Latest version of RHEL-like use dnf5, making the assert to fail#269
ceso wants to merge 139 commits into
gantsign:masterfrom
ceso:master

Conversation

@ceso

@ceso ceso commented Mar 27, 2026

Copy link
Copy Markdown

Hi,

latest versions of RHEL distros (e.g. Fedora 43) use dnf5, making the assert to fail and break the execution:

TASK [gantsign.visual-studio-code : Assert supported distribution] *************************************************
[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg.
[DEPRECATION WARNING]: INJECT_FACTS_AS_VARS default to `True` is deprecated, top-level facts will not be auto injected after the change. This feature will be removed from ansible-core version 2.24.
Origin: /home/ceso/.ansible/roles/gantsign.visual-studio-code/tasks/install.yml:6:9

4   ansible.builtin.assert:
5     that:
6       - "ansible_pkg_mgr in ('apt', 'yum', 'dnf', 'zypper', 'homebrew')"
          ^ column 9

Use `ansible_facts["fact_name"]` (no `ansible_` prefix) instead.

[ERROR]: Task failed: Action failed: Assertion failed
Origin: /home/ceso/.ansible/roles/gantsign.visual-studio-code/tasks/install.yml:3:3

1 # code: language=ansible
2 ---
3 - name: Assert supported distribution
    ^ column 3

fatal: [tuxedo]: FAILED! => {
    "assertion": "ansible_pkg_mgr in ('apt', 'yum', 'dnf', 'zypper', 'homebrew')",
    "changed": false,
    "evaluated_to": false,
    "msg": "Assertion failed"
}

--- STRIPPED ---
❯ ansible localhost -m setup | grep -i ansible_pkg_mgr
[WARNING]: No inventory was parsed, only implicit localhost is available
        "ansible_pkg_mgr": "dnf5",

❯ dnf --version
dnf5 version 5.2.18.0
dnf5 plugin API version 2.0
libdnf5 version 5.2.18.0
libdnf5 plugin API version 2.2

I simply added dnf5 to the list of supported ones.

Cheers!

freemanjp and others added 30 commits November 11, 2017 11:46
It would seem it's now an official Microsoft project.
1.18 will now be the default version installed.
Not having this here makes the role fail when there is no global
become: yes in the playbook/role definition.
To fix Travis CI build failure.
1.18.1 will now be the default version installed.
1.19 will now be the default version installed.
1.19.1 will now be the default version installed.
1.19.2 will now be the default version installed.
1.19.3 will now be the default version installed.
Ansible is incompatible with version 3.0.0 of the Python Docker library (see ansible/ansible#35612).
1.20 will now be the default version installed.
1.20.1 will now be the default version installed.
1.21 will now be the default version installed.
1.21.1 will now be the default version installed.
1.22 will now be the default version installed.
1.22.1 will now be the default version installed.
Hard coding the group to be the same as the username usually works for Ubuntu, but some distributions have a common default group (e.g. `users`) instead.

Bug fix: resolves gantsign#101
Avoid unnecessary escape sequence processing.
The extension was taken over by Microsoft.
It's not useful for testing this role.
Rather than downloading and installing the deb manually.
Using `yum` package manager.
Using `dnf` package manager.
Using `zypper` package manager.
Keeping up with the latest changes.
The default name generated by Ansible didn't match the name used by VS Code itself.

Fix: resolves gantsign#113
In preparation for resolving deprecated `include` warnings.
Since Ansible 2.4 `include` has been deprecated.

```
[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use
'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions.
```
freemanjp and others added 27 commits August 3, 2022 22:24
Previously kept any existing file.
Co-authored-by: Oskar Moge <oskar@mowge.com>
Ansible no longer supports version 2.9.
In preparation for upgrading Ansible Lint.
Ansible no longer supports version 4.
Ubuntu 22.04 will be the last release with `apt-key` (see https://manpages.ubuntu.com/manpages/jammy/man8/apt-key.8.html). `install-apt.yml` was updated to use the new (more secure) way of signing APT repos.

Co-authored-by: Juergen Hansmann <Juergen.Hansmann@swisstopo.ch>
To keep GitHub Actions updated.
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v2...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@v1...v2)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
make apt architecture dependent

Co-authored-by: SamuelLHuber <40248495+SamuelLHuber@users.noreply.github.com>
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](docker/setup-qemu-action@v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
They were causing failures on some Linux distributions.
In preparation for Molecule upgrade.
For improved VS Code editing support.
Visual Studio Code packages now correctly reference all required dependencies.
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](docker/setup-qemu-action@v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Canonical have ended standard support for Ubuntu Bionic.
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@CLAassistant

CLAassistant commented Mar 27, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ceso ceso force-pushed the master branch 2 times, most recently from d6025c6 to b1d9261 Compare March 29, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants