Sunday, July 14, 2019

# Ansible gathering  facts from remote servers.
=============================

======================================
getting facts from remote servers
======================================

[root@ansimaster:~/ansiroot/playbook]# ansible webservers -m setup | grep -A15  memory
        "ansible_memory_mb": {
            "nocache": {
                "free": 2177,
                "used": 598
            },
            "real": {
                "free": 1261,
                "total": 2775,
                "used": 1514
            },
            "swap": {
                "cached": 0,
                "free": 1023,
                "total": 1023,
                "used": 0
            }

==================================
listing complete pre-defined facts
==================================

[root@ansimaster:~/ansiroot/playbook]# ansible webservers -m setup
192.168.122.50 | SUCCESS => {
    "ansible_facts": {
        "ansible_all_ipv4_addresses": [
            "192.168.124.1",
            "192.168.122.31",
            "192.168.122.50"
        ],
        "ansible_all_ipv6_addresses": [
            "fe80::3874:e8e6:a1cd:5e9",
            "fe80::5054:ff:fe75:cb41"
        ],
        "ansible_apparmor": {
            "status": "disabled"
        },
        "ansible_architecture": "x86_64",
        "ansible_bios_date": "01/01/2011",
        "ansible_bios_version": "0.5.1",
        "ansible_cmdline": {
            "BOOT_IMAGE": "/vmlinuz-3.10.0-514.el7.x86_64",
            "LANG": "en_US.UTF-8",
            "crashkernel": "auto",
            "quiet": true,
            "rd.lvm.lv": "cl_web1/swap",
            "rhgb": true,
            "ro": true,
            "root": "/dev/mapper/cl_web1-root"
        },
        "ansible_date_time": {

----- Output is Snip-----


----- Output is Snip-----


            "hw_timestamp_filters": [],
            "ipv4": {
                "address": "192.168.122.50",
                "broadcast": "192.168.122.255",
                "netmask": "255.255.255.0",
                "network": "192.168.122.0"
            },
            "ipv6": [
                {
                    "address": "fe80::5054:ff:fe75:cb41",
                    "prefix": "64",
                    "scope": "link"
                }
            ],
            "macaddress": "52:54:00:75:cb:41",
            "module": "virtio_net",
            "mtu": 1500,
            "pciid": "virtio0",
            "promisc": false,
            "timestamping": [
                "rx_software",
                "software"
            ],
            "type": "ether"
        },
        "ansible_fips": false,
        "ansible_form_factor": "Other",
        "ansible_fqdn": "web1",
        "ansible_hostname": "web1",
        "ansible_interfaces": [
            "lo",
            "virbr0",
            "virbr0-nic",
            "ens10",
            "eth0"
        ],
        "ansible_kernel": "3.10.0-514.el7.x86_64",
        "ansible_lo": {
            "active": true,
            "device": "lo",


----- Output is Snip-----

No comments:

Post a Comment

kubernetes Pod Scheduling

 ===================   Deployment ================= 1.) Deployment without any nodeName or nodeSelector, pod will spread among all of the av...