This commit is contained in:
2026-07-24 12:00:43 -05:00
parent 9f1db4076f
commit f4f2b96d1a
4 changed files with 139 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
---
- name: test-get_hpf_facts.yml
hosts: all
tasks:
- name: Copy over get_hpf_facts.sh
ansible.builtin.copy:
src: hpf-ans/bin/get_hpf_facts.sh
dest: bin/get_hpf_facts.sh
owner: hpf-ans
group: hpf-ans
mode: u=rwx,go=gx
backup: true
- name: Run get_hpf_facts.sh
ansible.builtin.command:
cmd: bin/get_hpf_facts.sh {{ ansible_facts["os_family"] }}
register: hpf_facts
changed_when: false
- name: Convert k=v stdout into facts
ansible.builtin.set_fact:
"{{ item.split('=', 1)[0] }}": "{{ item.split('=', 1)[1] }}"
loop: "{{ hpf_facts.stdout.splitlines() }}"
- name: Print all variables
ansible.builtin.debug:
var: hostvars[inventory_hostname]
- name: Print skel
ansible.builtin.debug:
var: hpf_fact_skel