Update playbook to ask for name of service to be disabled

This commit is contained in:
2023-11-19 16:54:04 +05:30
parent f0a045d650
commit 807b6d2c40

View File

@@ -1,12 +1,16 @@
--- ---
- hosts: all - hosts: all
become: true become: true
vars_prompt:
- name: service
prompt: "Name of service to be stopped and disabled"
private: no
tasks: tasks:
- name: Disable a service - name: Disable a service
systemd: systemd:
name: unattended-upgrades name: "{{ service }}"
enabled: no enabled: no
- name: Stop a service - name: Stop a service
systemd: systemd:
name: unattended-upgrades name: "{{ service }}"
state: stopped state: stopped