Initial Ansible inventory and playbooks
This commit is contained in:
commit
c642a36406
5 changed files with 49 additions and 0 deletions
16
facts.yml
Normal file
16
facts.yml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
- name: Show VM facts
|
||||
hosts: proxmox_vms
|
||||
gather_facts: true
|
||||
|
||||
tasks:
|
||||
- name: Print important facts
|
||||
ansible.builtin.debug:
|
||||
msg:
|
||||
- "Host: {{ inventory_hostname }}"
|
||||
- "Hostname: {{ ansible_facts[\"hostname\"] }}"
|
||||
- "OS family: {{ ansible_facts[\"os_family\"] }}"
|
||||
- "Distribution: {{ ansible_facts[\"distribution\"] }}"
|
||||
- "Distribution version: {{ ansible_facts[\"distribution_version\"] }}"
|
||||
- "Package manager: {{ ansible_facts[\"pkg_mgr\"] }}"
|
||||
- "Python: {{ ansible_facts[\"python\"][\"executable\"] }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue