Answers: <p>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: <a href="https://github.com/ansible-collections/community.general/issues/3159" rel="nofollow noreferrer">https://github.com/ansible-collections/community.general/issues/3159</a></p>
  <p>For example:</p>
  <pre><code>- name: install a package with transactional-update
    ansible.builtin.command:  transactional-update --continue pkg install man
  </code></pre>
  <p>Multiple package names can be added.
  The parameter <code>--continue</code> is important, as otherwise only the last call to <code>transactional-update</code> will get effective.</p>
  <p>Another downside is, that a reboot is required, which can be triggered from Ansible, but that kills the Ansible run....</p>
  
Answers: CC BY-SA 4.0
Answers: 2021-08-06T21:20:33.867Z
Answers: 2021-08-06T21:20:33.867Z
Answers: sebix
Body: <p>When using an OpenSUSE transactional server, transactional-update must be used instead of <a href="https://en.opensuse.org/images/1/17/Zypper-cheat-sheet-1.pdf" rel="nofollow noreferrer"><code>Zypper</code></a>. Is there any way of doing this with Ansible?</p>
  
Comments: CC BY-SA 4.0
Comments: 2021-08-07T11:44:00.150Z
Comments: You also need to consider, that all changes in `/etc/` must be applied differently, i.e. in `transactional-update run` (or shell) and you don't have access to all locations from there, e.g. `/home`, where ansible usually stores temporary data.
Comments: sebix
Tags: <ansible><linux>
Title: Ansible with OpenSUSE transactional server
UserDisplayName: Matthias
ThreadText: # Ansible with OpenSUSE transactional server
  
  (Asked by: username_0 on 2021-08-04)
  
  When using an OpenSUSE transactional server, transactional-update must be used instead of [`Zypper`](https://en.opensuse.org/images/1/17/Zypper-cheat-sheet-1.pdf). Is there any way of doing this with Ansible?
  
  **Tags:** ansible, linux
  
  > **Comments:**
  > **username_1**: You also need to consider, that all changes in `/etc/` must be applied differently, i.e. in `transactional-update run` (or shell) and you don't have access to all locations from there, e.g. `/home`, where ansible usually stores temporary data.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-08-06. Score: 1
  
  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....
  
  
  ---
  
  