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

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*'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.