mini playbook
This commit is contained in:
@@ -1,19 +1,14 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- hosts: glusterfs
|
- hosts: test_server
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
become: false
|
become: false
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Install GlusterFS on all nodes"
|
- name: Run hostname -a
|
||||||
ansible.builtin.package:
|
command: hostname -a
|
||||||
name: glusterfs-server
|
register: hostname_out
|
||||||
state: present
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "Start and enable GlusterFS service"
|
- name: Show hostname output
|
||||||
ansible.builtin.service:
|
debug:
|
||||||
name: glusterd
|
var: hostname_out.stdout
|
||||||
state: started
|
|
||||||
enabled: true
|
|
||||||
become: true
|
|
||||||
@@ -4,7 +4,7 @@ all:
|
|||||||
children:
|
children:
|
||||||
bastion:
|
bastion:
|
||||||
hosts:
|
hosts:
|
||||||
bastion:
|
${bastion.name}:
|
||||||
ansible_host: "${bastion.default_ipv4_address}"
|
ansible_host: "${bastion.default_ipv4_address}"
|
||||||
ansible_user: clusteruser
|
ansible_user: clusteruser
|
||||||
test_server:
|
test_server:
|
||||||
|
|||||||
Reference in New Issue
Block a user