Files
Splunk_Docker/New-smaller/splunk-ansible/wrapper-example/hello-world.playbook
Brett Woodruff 28c8d411ad Inital Commit
2024-06-13 15:48:26 -04:00

38 lines
790 B
Plaintext

---
- hosts: all
gather_facts: False
pre_tasks:
- name: Install python for Ansible
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
register: output
changed_when: output.stdout != ""
- name: Setup ansible group
group:
name: ansible
state: present
- name: Setup ansible user
user:
name: ansible
state: present
group: ansible
- name: Setup splunk group
group:
name: splunk
state: present
- name: Setup splunk user
user:
name: splunk
state: present
group: splunk
- hosts: all
gather_facts: True
tasks:
- name: echo hello_world on each host
command: echo "hello_world"
register: hello_world