Files
demo2026-1/files/inventory.yml
2025-06-21 19:05:41 +05:00

17 lines
416 B
YAML

---
- name: inventory of machines HQ-SRV and HQ-CLI
hosts:
- HQ-SRV
- HQ-CLI
gather_facts: yes
tasks:
- name: create a report with workplace information
delegate_to: localhost
copy:
dest: "/etc/ansible/PC_INFO/{{ ansible_hostname }}.yml"
content: |
---
name pc: "{{ ansible_hostname }}"
ip-address pc: "{{ ansible_default_ipv4.address }}"