You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
602 B

  1. ---
  2. - name: Import Debian bootstrap
  3. import_tasks: debian.yml
  4. - name: Check unattended-upgrades file exist
  5. stat:
  6. path: /etc/apt/apt.conf.d/50unattended-upgrades
  7. register: unattended_upgrades_file_stat
  8. when:
  9. - ubuntu_kernel_unattended_upgrades_disabled
  10. - name: Disable kernel unattended-upgrades
  11. lineinfile:
  12. path: "{{ unattended_upgrades_file_stat.stat.path }}"
  13. insertafter: "Unattended-Upgrade::Package-Blacklist"
  14. line: '"linux-";'
  15. state: present
  16. become: true
  17. when:
  18. - ubuntu_kernel_unattended_upgrades_disabled
  19. - unattended_upgrades_file_stat.stat.exists