This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
forked from candlepin/rho
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Extract uname fact gathering to raw tasks. Closes #94. * remove the commented out code.
- Loading branch information
1 parent
791aa5c
commit 373e18c
Showing
8 changed files
with
168 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,6 @@ test/coverage | |
data | ||
doc/source/modules.rst | ||
doc/source/rho.rst | ||
|
||
.coverage | ||
.vagrant | ||
*.retry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
hosts: all | ||
roles: | ||
- collect | ||
- uname | ||
|
||
|
||
- name: write facts first to a variable and then to csv locally | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
|
||
- name: gather uname.os fact | ||
raw: uname -s | ||
register: uname_os | ||
ignore_errors: yes | ||
when: '"Username_uname.os" in facts_to_collect' | ||
|
||
- name: add uname.os to dictionary | ||
set_fact: | ||
uname: "{{ uname|default({}) | combine({ item: uname_os['stdout_lines'][0] }) }}" | ||
with_items: | ||
- 'uname.os' | ||
|
||
- name: gather uname.hostname fact | ||
raw: uname -n | ||
register: uname_hostname | ||
ignore_errors: yes | ||
when: '"Username_uname.hostname" in facts_to_collect' | ||
|
||
- name: add uname.hostname to dictionary | ||
set_fact: | ||
uname: "{{ uname|default({}) | combine({ item: uname_hostname['stdout_lines'][0] }) }}" | ||
with_items: | ||
- 'uname.hostname' | ||
|
||
- name: gather uname.processor fact | ||
raw: uname -p | ||
register: uname_processor | ||
ignore_errors: yes | ||
when: '"Username_uname.processor" in facts_to_collect' | ||
|
||
- name: add uname.processor to dictionary | ||
set_fact: | ||
uname: "{{ uname|default({}) | combine({ item: uname_processor['stdout_lines'][0] }) }}" | ||
with_items: | ||
- 'uname.processor' | ||
|
||
- name: gather uname.kernel fact | ||
raw: uname -r | ||
register: uname_kernel | ||
ignore_errors: yes | ||
when: '"Username_uname.kernel" in facts_to_collect' | ||
|
||
- name: add uname.kernel to dictionary | ||
set_fact: | ||
uname: "{{ uname|default({}) | combine({ item: uname_kernel['stdout_lines'][0] }) }}" | ||
with_items: | ||
- 'uname.kernel' | ||
|
||
- name: gather uname.all fact | ||
raw: uname -a | ||
register: uname_all | ||
ignore_errors: yes | ||
when: '"Username_uname.all" in facts_to_collect' | ||
|
||
- name: add uname.all to dictionary | ||
set_fact: | ||
uname: "{{ uname|default({}) | combine({ item: uname_all['stdout_lines'][0] }) }}" | ||
with_items: | ||
- 'uname.all' | ||
|
||
- name: gather uname.hardware_platform fact | ||
raw: uname -i | ||
register: uname_hardware_platform | ||
ignore_errors: yes | ||
when: '"Username_uname.hardware_platform" in facts_to_collect' | ||
|
||
- name: add uname.hardware_platform to dictionary | ||
set_fact: | ||
uname: "{{ uname|default({}) | combine({ item: uname_hardware_platform['stdout_lines'][0] }) }}" | ||
with_items: | ||
- 'uname.hardware_platform' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters