30 lines
682 B
YAML
30 lines
682 B
YAML
---
|
|
|
|
- name: test-get-hpf-facts.yml
|
|
hosts: all
|
|
|
|
tasks:
|
|
|
|
- name: Copy over get-hpf-facts.sh
|
|
ansible.builtin.copy:
|
|
src: home/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: registered_hpf_facts
|
|
changed_when: false
|
|
|
|
- name: Convert k=v stdout into facts
|
|
ansible.builtin.set_fact:
|
|
hpf_facts: "{{ registered_hpf_facts.stdout | from_json }}"
|
|
|
|
- name: Print skel
|
|
ansible.builtin.debug:
|
|
var: hpf_facts.skel
|