Changes

Jump to: navigation, search

OPS435 Online Lab9

30 bytes removed, 00:56, 26 March 2021
Part 4: Gather software and hardware information available on remote machine
== Part 4: Gather software and hardware information available on remote machine ==
: One of the main core ansible module is called "setup", it is automatically called by ansible playbook to gather useful "facts" about remote hosts that can be used in ansible playbooks. It can also be executed directly by the ansible command (/usr/bin/ansible) to check out what "facts" are available to on a remote host.
<pre>
[rchanraymond.chan@centos7 ansiblemtrx-node02pd lab9]$ ansible 192.168.99.153 jkwok -i hosts --private-key id_rsa -u instructor -m setup192.168.99.153 jkwok | SUCCESS => {
"ansible_facts": {
"ansible_all_ipv4_addresses": [
"19210.168102.122114.99", "192.168.99.153140"
],
"ansible_all_ipv6_addresses": [
"fe80::505421d:ffd8ff:fe11feb7:6767", "fe80::5054:ff:fe8c:b67c20cc"
],
"ansible_apparmor": {
"status": "disabled"
},
"ansible_architecture": "x86_64",
"ansible_bios_date": "0411/0126/20142012", "ansible_bios_version": "1.9.1-5.el7_3.2", "ansible_cmdline": { "BOOT_IMAGE": "/vmlinuz-3.10.0-862.14.4.el7.x86_64", "LANG": "en_CA.UTF-8", "console": "ttyS0",
...
 
"ansible_userspace_bits": "64",
"ansible_virtualization_role": "guest",
"ansible_virtualization_type": "kvmVirtualPC", "discovered_interpreter_python": "/usr/bin/python", "gather_subset": [ "all" ],
"module_setup": true
},
"changed": false
}
 
</pre>
[[OPS435_Ansible_setup|Click here for complete sample contents of the above]]
= Investigation II: Ansible Playbook =
1,760
edits

Navigation menu