Score:0

Apply Security patches using zypper module

ar flag

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

Michael Hampton avatar
cz flag
Did you check the [docs](https://docs.ansible.com/ansible/latest/collections/community/general/zypper_module.html)?
pugazhendhi avatar
ar flag
Yes already, there is no options available to perform security patching in Ansible-doc, but I'm sure there should be some other ways to perform the same which I'm not able to explore as of now.
Score:1
cn flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.