From 5972c8f7e7ff033e8689ee0a143c65096cceb93c Mon Sep 17 00:00:00 2001 From: Salt Date: Sat, 4 Jul 2020 19:50:55 -0500 Subject: [PATCH] Configure running services In particular, disable unattended-upgrades as it may interfere with ansible-pull --- roles/common/tasks/main.yml | 2 ++ roles/common/tasks/services.yml | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 roles/common/tasks/services.yml diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 7f5c3e6..acb7da8 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -43,4 +43,6 @@ - "97-overlayroot" - name: Configure Ansible user include_tasks: ansibleuser.yml + - name: Configure services + include_tasks: services.yml become: yes diff --git a/roles/common/tasks/services.yml b/roles/common/tasks/services.yml new file mode 100644 index 0000000..9498793 --- /dev/null +++ b/roles/common/tasks/services.yml @@ -0,0 +1,11 @@ +#!/usr/bin/ansible-playbook +# vim:ft=ansible: +--- +- name: Configure services + systemd: + name: "{{ item.name }}" + state: "{{ item.state }}" + enabled: "{{ item.enabled }}" + loop: + - { name: "unattended-upgrades", state: "stopped", enabled: no } + become: yes