When using an OpenSUSE transactional server, transactional-update must be used instead of Zypper
. Is there any way of doing this with Ansible?
1 Answer
I think currently the only way is to use the command (or shell) module, as there's no native support for transactional-updates in Ansible yet. However, there's a fresh feature request issue: https://github.com/ansible-collections/community.general/issues/3159
For example:
- name: install a package with transactional-update
ansible.builtin.command: transactional-update --continue pkg install man
Multiple package names can be added.
The parameter --continue
is important, as otherwise only the last call to transactional-update
will get effective.
Another downside is, that a reboot is required, which can be triggered from Ansible, but that kills the Ansible run....
/etc/
must be applied differently, i.e. intransactional-update run
(or shell) and you don't have access to all locations from there, e.g./home
, where ansible usually stores temporary data.