jnv / ansible-role-unattended-upgrades

[DEPRECATED] Setup unattended-upgrades on Debian-based systems
https://github.com/jnv/ansible-role-unattended-upgrades/issues/98
GNU General Public License v2.0
272 stars 94 forks source link

How to deal with the 10Periodic file in /etc/apt/apt.conf.d/ #75

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hello,

I still have the 10Periodic file present which overwrites 20auto-upgrade. Can we add a task to delete the file when the playbook runs, instead of using the one-shot command?

jnv commented 4 years ago

Hi, what's the issue here? Is the file being added to your system regularly or why is one-shot command not sufficient?

I would prefer not to add any implicit, destructive operations to this role. It is documented precisely for this reason as a note. You can always add a file task on your own:

- name: Remove /etc/apt/apt.conf.d/10periodic
  file:
    state: absent
    path: "/etc/apt/apt.conf.d/10periodic"

(Not sure about the capitalization though, you are mentioning that the file is named 10Periodic but it used to be 10periodic – lowercase 'p'. Maybe that's your issue here?)

ghost commented 4 years ago

Hi, sorry about the capitalization (habit). 10periodic.

I would prefer not to add any implicit, destructive operations to this role

Right, if that is the reason, as i thought it would be nice to have it in the upstream then adding it manually or doing a one-shot separately. :+1: