Tests run on centos 8.
parent
2e57687c14
commit
dabb0c2819
@ -0,0 +1,16 @@
|
||||
os_release: Ansible Role
|
||||
================================================================================
|
||||
|
||||
Grabs and parses the contents of /etc/os-release.
|
||||
|
||||
This file holds additional information that may not be provided by the setup
|
||||
module. For example, if we wanted to know whether or not a host has Manjaro
|
||||
installed, it is not easy to figure this out from the setup module. The setup
|
||||
module produces `ansible_distribution=Archlinux` while this role produces
|
||||
`os_release.ID=manjaro`.
|
||||
|
||||
License
|
||||
----------------------------------------
|
||||
|
||||
GPL-3.0
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
---
|
||||
# tasks file for os_release
|
||||
- debug:
|
||||
msg: "System {{ inventory_hostname }} has uuid {{ ansible_product_uuid }}"
|
||||
- name: Retrieve and parse the contents of /etc/os-release
|
||||
ansible.netcommon.cli_parse:
|
||||
command: cat /etc/os-release
|
||||
parser:
|
||||
name: ansible.netcommon.native
|
||||
os: linux
|
||||
command: cat os-release
|
||||
set_fact: os_release
|
||||
|
||||
|
||||
Loading…
Reference in New Issue