From 6e20bbb59672ffb7e19d71e055b36c11a37fe774 Mon Sep 17 00:00:00 2001 From: WhatTheMike Date: Fri, 23 Dec 2022 21:51:52 +0000 Subject: [PATCH] Added script to gather service tags from prox servers. --- playbooks/servicetag.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 playbooks/servicetag.yaml diff --git a/playbooks/servicetag.yaml b/playbooks/servicetag.yaml new file mode 100644 index 0000000..f0ab896 --- /dev/null +++ b/playbooks/servicetag.yaml @@ -0,0 +1,21 @@ +- name: Service Tag Retriever + hosts: proxmox + tasks: + - name: Confirm directory structure + ansible.builtin.file: + path: /opt/ansible/ + state: directory + - name: Ensure service tag script is present + ansible.builtin.copy: + src: /root/ansible/files/servicetag.sh + dest: /opt/ansible/servicetag.sh + mode: '0755' + force: yes + - name: Execute service tag script + ansible.builtin.command: + chdir: /opt/ansible + cmd: ./servicetag.sh + register: stdout + - name: Display service tags + debug: + var=stdout.stdout