Do we have any options to apply security patches only with Zypper ansible module for suse linux server. We don't want to use shell or command module and incorporate the command.
Equivalent command shell: zypper patch --category=security
Do we have any options to apply security patches only with Zypper ansible module for suse linux server. We don't want to use shell or command module and incorporate the command.
Equivalent command shell: zypper patch --category=security
Some Ansible modules, including zypper, have parameters that allow arbitrary extra options. To go beyond the documented examples, get creative by adding what you already know works without Ansible.
zypper module doc has an example of applying patches. Which just leaves filtering by category security:
- name: Apply security patches
zypper:
name: '*'
state: latest
type: patch
extra_args: '--category=security'
name: '*'
is an Ansible convention for all packages. Read the module code to see that is is implmented as zypper patch
without a package argument.