0

I'm attempting to write an Ansible playbook to update all packages except the kernel. Whenever I run the following playbook, all packages get updated, including the kernel. Any ideas why my exclude parameter is being ignored?

  - name: upgrade all packages, excluding kernel
    yum:
      name: '*'
      state: latest
      exclude: kernel*
2

1 Answer 1

3

It is working for me at ansible 2.9. The only difference from your playbook is that I have quotes around kernel*:

  - name: upgrade all packages, excluding kernel
    yum:
      name: '*'
      state: latest
      exclude: 'kernel*'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .