You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
790 B
38 lines
790 B
---
|
|
- 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
|