klal
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
2026-03-24 22:18:34 +01:00
parent 68775c50da
commit e3cd8f5843
16 changed files with 236 additions and 35 deletions
+45
View File
@@ -0,0 +1,45 @@
- name: Install puppet agent
become: "{{ false if inventory_hostname == 'nas.home.lan' else true }}"
vars:
puppet_server: active.home.lan
block:
# - name: Ensure Puppet repo is present (Debian/Ubuntu)
# apt_repository:
# repo: "deb http://apt.puppetlabs.com {{ ansible_distribution_release }} puppet6"
# state: present
# when: ansible_os_family == "Debian"
- name: Facts
ansible.builtin.setup:
when: ansible_facts.architecture is not defined
- name: Install Puppet agent package
package:
name: puppet-agent
state: present
- name: Create Puppet configuration directory
file:
path: /etc/puppetlabs/puppet
state: directory
mode: '0755'
- name: Deploy puppet.conf
template:
src: puppet.conf.j2
dest: /etc/puppet/puppet.conf
owner: root
group: root
mode: '0644'
- name: Enable and start puppet agent
systemd:
name: puppet
enabled: true
state: started
- name: Trigger puppet agent run once1
command: /usr/bin/puppet agent -t
register: puppet_run
ignore_errors: true
- debug:
var: puppet_run.stdout_lines