Call for testing: Ansible 6.x (ansible-core 2.13.1 with community collections) and ansible-lint 6.x
TL;DR: ansible > 2.9 needs testing, as does ansible-lint 6.x (Please reply to the factory list)
https://build.opensuse.org/project/show/systemsmanagement:ansible
Hi all, in the last couple of weeks I spent some time on getting ansible > 2.9 packaged and running on openSUSE. As you may or may not be aware, 2.9 is EOL since ansible-core 2.13 got released. What, what? ansible-what? WTF? Basically the ansible package you will install is a package only containing community maintained collections, that were removed from what you know as ansible 2.9. The remaining parts are what is now called ansible-core. This means that collections can be maintained separately, and you do not need to wait for a release of ansible to get a fix in your collection. Having a recent ansible/ansible-core package allows the use of ansible-lint 6.x, which requires ansible-core > 2.12. The version numbers are very ...ahem... funny, so don't get confused. ansible-core keeps the 2.x versioning for now, but the ansible package (think of it as ansible-community) is currently at 6.1.x, Details can be found here:
https://docs.ansible.com/ansible/latest/reference_appendices/release_and_mai...
The packages seem to be working for me, so I put them into systemsmanagement:ansible and would be glad for feedback.
https://build.opensuse.org/project/show/systemsmanagement:ansible
Something like that should do the trick: sudo zypper ar -p 80 -f -r \ https://download.opensuse.org/repositories/systemsmanagement:/ansible/openSU... sudo zypper ref sudo zypper dup --from systemsmanagement_ansible or sudo zypper in ansible ansible-lint Unless there are flaws, I would submit them to Factory in a couple of weeks, ask for a change of the devel project and move all other ansible-related things into this subproject. Having more maintainers would of course be very nice, so please don't be shy. python-jsonschema and python-hatch_vcs are already in dlp and on their way to Factory, so those will be dropped from the project once they are no longer needed. Unfortunately backporting this to Leap 15 / SLES15 is not (easily) possible, as it needs a rather new python to get this to build and work properly... :-( Any hints, comments, tipps, tricks or feedback are highly welcome. Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Am Freitag, 22. Juli 2022, 17:36:21 CEST schrieb Johannes Kastl:
TL;DR: ansible > 2.9 needs testing, as does ansible-lint 6.x
So am I understanding your package schema right? ansible-core is contains /usr/bin/ansible, ansible-6.x contains all the community collections? I'm game :) Cheers MH -- Mathias Homann Mathias.Homann@openSUSE.org Jabber (XMPP): lemmy@tuxonline.tech Matrix: @mathias:eregion.de IRC: [Lemmy] on freenode and ircnet (bouncer active) keybase: https://keybase.io/lemmy gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
Hi Matthias, On 22.07.22 at 18:22 Mathias Homann wrote:
Am Freitag, 22. Juli 2022, 17:36:21 CEST schrieb Johannes Kastl:
TL;DR: ansible > 2.9 needs testing, as does ansible-lint 6.x
So am I understanding your package schema right? ansible-core is contains /usr/bin/ansible, ansible-6.x contains all the community collections?
Yes. At least as far as I understood it. ;-) The ansible package aka non-core only contains one binary, and that is /usr/bin/ansible-community. Only so you can call it and get the version: $ ansible-community --version Ansible community version 6.1.0 $ And "all the community collections" should be "all the collections that have opted to be included". At least AFAIK ;-) Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Am Freitag, 22. Juli 2022, 19:41:47 CEST schrieb Johannes Kastl:
Hi Matthias,
On 22.07.22 at 18:22 Mathias Homann wrote:
Am Freitag, 22. Juli 2022, 17:36:21 CEST schrieb Johannes Kastl:
TL;DR: ansible > 2.9 needs testing, as does ansible-lint 6.x
I'm running my own matrix server, which I manage with the ansible plays from this project: https://github.com/spantaleev/matrix-docker-ansible-deploy/ I just ran the deployment, start and healthcheck parts with ansible 2.13 from your packages, no problems whatsoever. :thumbsup: Cheers MH -- Mathias Homann Mathias.Homann@openSUSE.org Jabber (XMPP): lemmy@tuxonline.tech Matrix: @mathias:eregion.de IRC: [Lemmy] on freenode and ircnet (bouncer active) keybase: https://keybase.io/lemmy gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
On 22.07.22 at 23:19 Mathias Homann wrote:
I'm running my own matrix server, which I manage with the ansible plays from this project: https://github.com/spantaleev/matrix-docker-ansible-deploy/
I just ran the deployment, start and healthcheck parts with ansible 2.13 from your packages, no problems whatsoever.
Thanks for testing and thanks for reporting back. Nice to hear everything worked! Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
On 22.07.22 at 23:19 Mathias Homann wrote:
I'm running my own matrix server, which I manage with the ansible plays from
Am Samstag, 23. Juli 2022, 22:22:21 CEST schrieb Johannes Kastl: this project:
https://github.com/spantaleev/matrix-docker-ansible-deploy/
I just ran the deployment, start and healthcheck parts with ansible 2.13 from your packages, no problems whatsoever.
Thanks for testing and thanks for reporting back. Nice to hear everything worked!
by now i've also used the upgraded ansible-lint against a few of my plays, with the expected results. Cheers MH -- Mathias Homann Mathias.Homann@openSUSE.org Jabber (XMPP): lemmy@tuxonline.tech Matrix: @mathias:eregion.de IRC: [Lemmy] on freenode and ircnet (bouncer active) keybase: https://keybase.io/lemmy gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
On Fri, 2022-07-22 at 17:36 +0200, Johannes Kastl wrote:
TL;DR: ansible > 2.9 needs testing, as does ansible-lint 6.x
(Please reply to the factory list)
https://build.opensuse.org/project/show/systemsmanagement:ansible
Hi all,
in the last couple of weeks I spent some time on getting ansible > 2.9 packaged and running on openSUSE. As you may or may not be aware, 2.9 is EOL since ansible-core 2.13 got released.
What, what? ansible-what? WTF?
Basically the ansible package you will install is a package only containing community maintained collections, that were removed from what you know as ansible 2.9. The remaining parts are what is now called ansible-core. This means that collections can be maintained separately, and you do not need to wait for a release of ansible to get a fix in your collection.
Having a recent ansible/ansible-core package allows the use of ansible-lint 6.x, which requires ansible-core > 2.12.
The version numbers are very ...ahem... funny, so don't get confused. ansible-core keeps the 2.x versioning for now, but the ansible package (think of it as ansible-community) is currently at 6.1.x, Details can be found here:
https://docs.ansible.com/ansible/latest/reference_appendices/release_and_mai...
The packages seem to be working for me, so I put them into systemsmanagement:ansible and would be glad for feedback.
https://build.opensuse.org/project/show/systemsmanagement:ansible
Something like that should do the trick:
sudo zypper ar -p 80 -f -r \ https://download.opensuse.org/repositories/systemsmanagement:/ansible/openSU... sudo zypper ref
sudo zypper dup --from systemsmanagement_ansible or sudo zypper in ansible ansible-lint
Unless there are flaws, I would submit them to Factory in a couple of weeks, ask for a change of the devel project and move all other ansible-related things into this subproject. Having more maintainers would of course be very nice, so please don't be shy.
python-jsonschema and python-hatch_vcs are already in dlp and on their way to Factory, so those will be dropped from the project once they are no longer needed.
Unfortunately backporting this to Leap 15 / SLES15 is not (easily) possible, as it needs a rather new python to get this to build and work properly... :-(
Any hints, comments, tipps, tricks or feedback are highly welcome.
Kind Regards, Johannes
-- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de
B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
I'm going to start using this as well. I haven't been doing anything overly complicated w/ ansible over the last 1-2 years but I've got a personal repo I'm accustomed to using. Was using (sudo zypper rm ansible): ansible | package | 2.9.27-1.4 | noarch | Main Repository (OSS) Switched to (sudo zypper in ansible-core): ansible-core | package | 2.13.2-1.1 | noarch | All things ansible No issues on an initial run using ansible-playbook 👍️ -- ~ Scott Bradnick |- Windows Subsystem for Linux (WSL) Developer |-- Tumbleweed: |--- Dell Precision 5540 [NVIDIA Quadro T1000] (x86_64) |--- O-DROID H2+ [UHD Graphics 600] (x86_64) |--- 2x Raspberry Pi 4 Model B Rev 1.2 (aarch64) |--- 1x Raspberry Pi 3 Model B Rev 1.2 (aarch64) |--- WinBook TW100 (x86_64) https://keys.openpgp.org/ :: DBC5AA9A2D2BAEBC
Hi Scott, On 22.07.22 at 19:33 Scott Bradnick wrote:
Was using (sudo zypper rm ansible): ansible | package | 2.9.27-1.4 | noarch | Main Repository (OSS)
Switched to (sudo zypper in ansible-core): ansible-core | package | 2.13.2-1.1 | noarch | All things ansible
No issues on an initial run using ansible-playbook 👍️
If you are only using modules that are now being called "ansible.builtin.*", then ansible-core is enough. That is things like file, template, service and the likes. But e.g. zypper_repository is now inside the community.* collections, and then ansible-core is failing... Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
On Fri, 2022-07-22 at 19:45 +0200, Johannes Kastl wrote:
Hi Scott,
On 22.07.22 at 19:33 Scott Bradnick wrote:
Was using (sudo zypper rm ansible): ansible | package | 2.9.27-1.4 | noarch | Main Repository (OSS)
Switched to (sudo zypper in ansible-core): ansible-core | package | 2.13.2-1.1 | noarch | All things ansible
No issues on an initial run using ansible-playbook 👍️
If you are only using modules that are now being called "ansible.builtin.*", then ansible-core is enough. That is things like file, template, service and the likes.
But e.g. zypper_repository is now inside the community.* collections, and then ansible-core is failing...
Johannes
-- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de
B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Yep, you've described my use-case quite spot-on: I'm basically using these in various places -- (`rg --trim --no-line-number --no-filename -g \*.yml "ansible\." | sort -u`) ansible.builtin.command ansible.builtin.debug ansible.builtin.file ansible.builtin.get_url ansible.builtin.git ansible.builtin.lineinfile ansible.builtin.package ansible.builtin.package_facts ansible.builtin.unarchive I am at a point though where I should look into something to manage zypper repos ~ at worst as a learning experience for how ansible will be packaged going forward 😉️ -- ~ Scott Bradnick |- Windows Subsystem for Linux (WSL) Developer |-- Tumbleweed: |--- Dell Precision 5540 [NVIDIA Quadro T1000] (x86_64) |--- O-DROID H2+ [UHD Graphics 600] (x86_64) |--- 2x Raspberry Pi 4 Model B Rev 1.2 (aarch64) |--- 1x Raspberry Pi 3 Model B Rev 1.2 (aarch64) |--- WinBook TW100 (x86_64) https://keys.openpgp.org/ :: DBC5AA9A2D2BAEBC
On 22.07.22 at 19:57 Scott Bradnick wrote:
I am at a point though where I should look into something to manage zypper repos ~ at worst as a learning experience for how ansible will be packaged going forward 😉️
Instead of using the ansible package with its many collections you can of course only install the zypper_repository module from the community.general collection:
https://docs.ansible.com/ansible/latest/collections/community/general/zypper...
This module is part of the community.general collection (version 5.3.0). You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list. To install it, use: ansible-galaxy collection install community.general. To use it in a playbook, specify: community.general.zypper_repository.
Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
On Fri, 2022-07-22 at 20:04 +0200, Johannes Kastl wrote:
On 22.07.22 at 19:57 Scott Bradnick wrote:
I am at a point though where I should look into something to manage zypper repos ~ at worst as a learning experience for how ansible will be packaged going forward 😉️
Instead of using the ansible package with its many collections you can of course only install the zypper_repository module from the community.general collection:
https://docs.ansible.com/ansible/latest/collections/community/general/zypper...
This module is part of the community.general collection (version 5.3.0). You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list. To install it, use: ansible-galaxy collection install community.general. To use it in a playbook, specify: community.general.zypper_repository.
Johannes
-- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de
B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Very cool, thanks for the info. Got a good starting point going now: ``` $ ansible-galaxy collection list # /home/scott/.ansible/collections/ansible_collections Collection Version ----------------- ------- community.general 5.3.0 ``` ``` $ cat repos.yml #!/usr/bin/env ansible-playbook --- - hosts: all tasks: - name: Add OBS home:sbradnick repository community.general.zypper_repository: repo: 'https://download.opensuse.org/repositories/home:/sbradnick/openSUSE_Tumblewe...' priority: 91 become: true when: ansible_distribution == "openSUSE Tumbleweed" ``` -- ~ Scott Bradnick |- Windows Subsystem for Linux (WSL) Developer |-- Tumbleweed: |--- Dell Precision 5540 [NVIDIA Quadro T1000] (x86_64) |--- O-DROID H2+ [UHD Graphics 600] (x86_64) |--- 2x Raspberry Pi 4 Model B Rev 1.2 (aarch64) |--- 1x Raspberry Pi 3 Model B Rev 1.2 (aarch64) |--- WinBook TW100 (x86_64) https://keys.openpgp.org/ :: DBC5AA9A2D2BAEBC
participants (3)
-
Johannes Kastl
-
Mathias Homann
-
Scott Bradnick