Added playbook to disable puppet
This commit is contained in:
22
playbooks/base.yml
Normal file
22
playbooks/base.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
|
||||
- name: Disable Puppet Service if present
|
||||
hosts: all
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Check if Puppet service exists
|
||||
ansible.builtin.service_facts:
|
||||
|
||||
- name: Stop and disable Puppet agent
|
||||
ansible.builtin.service:
|
||||
name: puppet
|
||||
state: stopped
|
||||
enabled: False
|
||||
when: "'puppet.service' in services or 'puppet' in services"
|
||||
|
||||
- name: Disable Puppet skip-run (Optional but recommended)
|
||||
ansible.builtin.command:
|
||||
cmd: puppet agent --disable "Disabled via Ansible"
|
||||
become: yes
|
||||
when: "'puppet.service' in services or 'puppet' in services"
|
||||
changed_when: False
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
|
||||
- import_playbook: ntp.yml
|
||||
- import_playbook: base.yml
|
||||
- import_playbook: auth.yml
|
||||
- import_playbook: packages.yml
|
||||
- import_playbook: gitea.yml
|
||||
|
||||
Reference in New Issue
Block a user