Created
March 3, 2020 15:09
-
-
Save ekbfh/e4a5ab8f057cd0065d31eb14b59d3ca6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: "Disable timers for unattended upgrade" | |
raw: "systemctl disable --now {{ item }}" | |
loop: | |
- 'apt-daily.timer' | |
- 'apt-daily-upgrade.timer' | |
changed_when: false | |
when: ansible_connection != 'docker' | |
- name: "Reload systemctl daemon to apply the new changes" | |
raw: "systemctl daemon-reload" | |
changed_when: false | |
when: ansible_connection != 'docker' | |
- name: "Wait for any possibly running unattended upgrade to finish" | |
raw: "systemd-run --property=\"After=apt-daily.service apt-daily-upgrade.service\" --wait /bin/true" | |
changed_when: false | |
when: ansible_connection != 'docker' | |
- name: "Purge unattended upgrades" | |
raw: apt-get -y purge unattended-upgrades | |
changed_when: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment