mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2026-05-04 15:49:49 +02:00
This commit is contained in:
@@ -12,18 +12,18 @@
|
|||||||
ansible.builtin.setup:
|
ansible.builtin.setup:
|
||||||
when: ansible_facts.architecture is not defined
|
when: ansible_facts.architecture is not defined
|
||||||
- name: Install Puppet agent package
|
- name: Install Puppet agent package
|
||||||
package:
|
ansible.builtin.package:
|
||||||
name: puppet-agent
|
name: puppet-agent
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Create Puppet configuration directory
|
- name: Create Puppet configuration directory
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: /etc/puppetlabs/puppet
|
path: /etc/puppetlabs/puppet
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
- name: Deploy puppet.conf
|
- name: Deploy puppet.conf
|
||||||
template:
|
ansible.builtin.template:
|
||||||
src: puppet.conf.j2
|
src: puppet.conf.j2
|
||||||
dest: /etc/puppet/puppet.conf
|
dest: /etc/puppet/puppet.conf
|
||||||
owner: root
|
owner: root
|
||||||
@@ -31,15 +31,16 @@
|
|||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
- name: Enable and start puppet agent
|
- name: Enable and start puppet agent
|
||||||
systemd:
|
ansible.builtin.systemd:
|
||||||
name: puppet
|
name: puppet
|
||||||
enabled: true
|
enabled: true
|
||||||
state: started
|
state: started
|
||||||
|
|
||||||
- name: Trigger puppet agent run once1
|
- name: Trigger puppet agent run once
|
||||||
command: /usr/bin/puppet agent -t
|
ansible.builtin.command: /usr/bin/puppet agent -t
|
||||||
register: puppet_run
|
register: puppet_run
|
||||||
ignore_errors: true
|
changed_when: puppet_run.rc != 0
|
||||||
|
|
||||||
- debug:
|
- name: Debug puppet run output
|
||||||
|
ansible.builtin.debug:
|
||||||
var: puppet_run.stdout_lines
|
var: puppet_run.stdout_lines
|
||||||
Reference in New Issue
Block a user