From 32ac0221d1d125e5b675e7c600c55b1f48ef1125 Mon Sep 17 00:00:00 2001 From: Benedikt Penner Date: Sat, 14 Mar 2026 21:52:37 +0100 Subject: [PATCH] mini playbook --- glusterfs/ansible/setup_galery.yml | 19 +++++++------------ .../terraform/templates/inventory.yml.tftpl | 2 +- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/glusterfs/ansible/setup_galery.yml b/glusterfs/ansible/setup_galery.yml index 8217daa..d930f27 100644 --- a/glusterfs/ansible/setup_galery.yml +++ b/glusterfs/ansible/setup_galery.yml @@ -1,19 +1,14 @@ --- -- hosts: glusterfs +- hosts: test_server gather_facts: true become: false tasks: - - name: "Install GlusterFS on all nodes" - ansible.builtin.package: - name: glusterfs-server - state: present - become: true + - name: Run hostname -a + command: hostname -a + register: hostname_out - - name: "Start and enable GlusterFS service" - ansible.builtin.service: - name: glusterd - state: started - enabled: true - become: true \ No newline at end of file + - name: Show hostname output + debug: + var: hostname_out.stdout \ No newline at end of file diff --git a/glusterfs/terraform/templates/inventory.yml.tftpl b/glusterfs/terraform/templates/inventory.yml.tftpl index c9cc9d9..ea84482 100644 --- a/glusterfs/terraform/templates/inventory.yml.tftpl +++ b/glusterfs/terraform/templates/inventory.yml.tftpl @@ -4,7 +4,7 @@ all: children: bastion: hosts: - bastion: + ${bastion.name}: ansible_host: "${bastion.default_ipv4_address}" ansible_user: clusteruser test_server: