Please look at
https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html.
You can install the RPM from ansible's site or make sure your centos
installation is updated to latest and have access to the correct repository
EX. EPEL.

On Mon, Aug 19, 2019 at 10:47 AM Mike Eggleston <[email protected]>
wrote:

> Found the ROM on the ansible site. Installing now.
>
> Mike
>
> On Aug 19, 2019, at 09:44, Mike Eggleston <[email protected]> wrote:
>
>
>
> [root@dvlnx108 ~]# rpm -qi ansible
>
> Name        : ansible
>
> Version     : 2.4.2.0
>
> Release     : 2.el7
>
> Architecture: noarch
>
> Install Date: Mon 29 Jul 2019 02:24:00 PM CDT
>
> Group       : Development/Libraries
>
> Size        : 40059005
>
> License     : GPLv3+
>
> Signature   : RSA/SHA256, Mon 29 Jan 2018 03:51:53 PM CST, Key ID
> 24c6a8a7f4a80eb5
>
> Source RPM  : ansible-2.4.2.0-2.el7.src.rpm
>
> Build Date  : Mon 29 Jan 2018 02:16:59 PM CST
>
> Build Host  : x86_64_01.bsys.centos.org
>
> Relocations : (not relocatable)
>
> Packager    : CentOS BuildSystem <http://bugs.centos.org>
>
> Vendor      : CentOS
>
> URL         : http://ansible.com
>
> Summary     : SSH-based configuration management, deployment, and task
> execution system
>
> Description :
>
>
>
> Ansible is a radically simple model-driven configuration management,
>
> multi-node deployment, and remote task execution system. Ansible works
>
> over SSH and does not require any software or daemons to be installed
>
> on remote nodes. Extension modules can be written in any language and
>
> are transferred to managed machines automatically.
>
>
> This is the latest RPM available in the CentOS repository. Is there a
> latest RPM available?
>
> Mike
>
> On Aug 19, 2019, at 09:23, Jonathan Lozada De La Matta <
> [email protected]> wrote:
>
> Before we go more into dept, I suggest you upgrade ansible versions to
> either 2.7 or 2.8. Ansible version 2.4 is EOL. It would be harder to
> troubleshoot this.
>
> On Mon, Aug 19, 2019 at 10:21 AM Mike Eggleston <[email protected]>
> wrote:
>
>> I changed the yum to an uptime. The connection issue is in the handler.
>>
>> Here’s the interpreter message:
>>
>> [meggle1@dvlnx108 playbooks]$ ansible-playbook -vvv -u root -k --limit
>> dvlnx115 y.yml
>>
>> ansible-playbook 2.4.2.0
>>
>>   config file = /home/meggle1/src/ansible/ansible.cfg
>>
>>   configured module search path = [u'/home/meggle1/src/ansible/playbooks']
>>
>>   ansible python module location =
>> /usr/lib/python2.7/site-packages/ansible
>>
>>   executable location = /usr/bin/ansible-playbook
>>
>>   python version = 2.7.5 (default, Jun 20 2019, 20:27:34) [GCC 4.8.5
>> 20150623 (Red Hat 4.8.5-36)]
>>
>> Using /home/meggle1/src/ansible/ansible.cfg as config file
>>
>> SSH password:
>>
>> Parsed /home/meggle1/src/ansible/newinventory inventory source with ini
>> plugin
>>
>>
>>
>> PLAYBOOK: y.yml
>> *********************************************************************************************************************************************
>>
>> 1 plays in y.yml
>>
>>
>>
>> PLAY [all]
>> **************************************************************************************************************************************************
>>
>>
>>
>> TASK [Gathering Facts]
>> **************************************************************************************************************************************
>>
>> Using module file
>> /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py
>>
>> <dvlnx115> ESTABLISH SSH CONNECTION FOR USER: root
>>
>> <dvlnx115> SSH: EXEC sshpass -d13 ssh -o ConnectTimeout=5 -o
>> ServerAliveInterval=10 -o ServerAliveCountMax=720 -o
>> StrictHostKeyChecking=ask -o User=root -o ConnectTimeout=10 dvlnx115
>> '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"''
>>
>> <dvlnx115> (0, '\n{"invocation": {"module_args": {"filter": "*",
>> "gather_subset": ["all"], "fact_path": "/etc/ansible/facts.d",
>> "gather_timeout": 10}}, "ansible_facts": {"ansible_product_serial":
>> "VMware-42 12 36 76 5b 94 86 03-e1 82 dc f3 6e e3 b4 ab",
>> "ansible_form_factor": "Other", "ansible_distribution_file_parsed": true,
>> "ansible_fips": false, "ansible_service_mgr": "systemd", "ansible_user_id":
>> "root", "ansible_selinux_python_present": true, "ansible_userspace_bits":
>> "64", "ansible_ssh_host_key_rsa_public":
>> "AAAAB3NzaC1yc2EAAAADAQABAAABAQC+4PWY9xn7bJxcYd/uWpEmx2RM4ikwPdYW5zXVWFpNKdkjDg8Fz6zEtXbaccVZIfuWM6aJpvgIILRfoI9rjCiCp60oxQh3luE9K3liCqZD4ue6uc8P2KPT7AHq3AQzyFHV01hBpBNWXYFAVG6YrK8cRWxPqc1V7oFpHXwmzQpy5Mq5PdHF6WFbCX2VgvQETkSYrnGJ5ffTZv1j9KmHaurfbPGtd39L78DU60vrRlJgybMc0bNuipJreFibCbiYGwEYZipXp9yWiWVDItlhfBnrADDNEQgaU1UNrHaITNpJ6cz0N1t/QdGcysOv2GBuVGL6bff7JIvNLZdDjFAGJnxz",
>> "gather_subset": ["all"], "ansible_real_user_id": 0,
>> "ansible_architecture": "x86_64", "ansible_local": {},
>> "ansible_distribution_version": "7.6.1810", "ansible_domain": "
>> firstcash.com", "ansible_distribution_file_path": "/etc/redhat-release",
>> "ansible_user_shell": "/bin/bash", "ansible_date_time": {"weekday_number":
>> "1", "iso8601_basic_short": "20190819T091701", "tz": "CDT", "weeknumber":
>> "33", "hour": "09", "year": "2019", "minute": "17", "tz_offset": "-0500",
>> "month": "08", "epoch": "1566224221", "iso8601_micro":
>> "2019-08-19T14:17:01.672768Z", "weekday": "Monday", "time": "09:17:01",
>> "date": "2019-08-19", "iso8601": "2019-08-19T14:17:01Z", "day": "19",
>> "iso8601_basic": "20190819T091701672648", "second": "01"},
>> "ansible_ssh_host_key_ed25519_public":
>> "AAAAC3NzaC1lZDI1NTE5AAAAIEN2FHch8bOc4L0p+r9e5aVVlhJkkWZtxWxaraxNLfVe",
>> "ansible_processor_cores": 2, "ansible_virtualization_role": "guest",
>> "ansible_distribution_file_variety": "RedHat", "ansible_env": {"LANG":
>> "en_US.UTF-8", "SHELL": "/bin/bash", "XDG_RUNTIME_DIR": "/run/user/0",
>> "SHLVL": "2", "SSH_CLIENT": "10.50.118.247 37170 22", "LESSOPEN":
>> "||/usr/bin/lesspipe.sh %s", "PATH":
>> "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin", "PWD": "/root",
>> "SELINUX_ROLE_REQUESTED": "", "SELINUX_USE_CURRENT_RANGE": "", "LOGNAME":
>> "root", "USER": "root", "MAIL": "/var/mail/root", "HOME": "/root",
>> "SELINUX_LEVEL_REQUESTED": "", "XDG_SESSION_ID": "1", "_":
>> "/usr/bin/python", "SSH_CONNECTION": "10.50.118.247 37170 10.50.118.245
>> 22"}, "ansible_effective_group_id": 0, "ansible_bios_version": "6.00",
>> "ansible_processor": ["0", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2670 0
>> @ 2.60GHz", "1", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2670 0 @
>> 2.60GHz", "2", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz",
>> "3", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz"],
>> "ansible_virtualization_type": "VMware", "ansible_lo": {"features":
>> {"tx_checksum_ipv4": "off [fixed]", "generic_receive_offload": "on",
>> "tx_checksum_ipv6": "off [fixed]", "tx_scatter_gather_fraglist": "on
>> [fixed]", "rx_all": "off [fixed]", "highdma": "on [fixed]", "rx_fcs": "off
>> [fixed]", "tx_lockless": "on [fixed]", "tx_tcp_ecn_segmentation": "on",
>> "rx_udp_tunnel_port_offload": "off [fixed]", "tx_tcp6_segmentation": "on",
>> "tx_gso_robust": "off [fixed]", "tx_ipip_segmentation": "off [fixed]",
>> "tx_tcp_mangleid_segmentation": "on", "tx_checksumming": "on",
>> "vlan_challenged": "on [fixed]", "loopback": "on [fixed]", "fcoe_mtu": "off
>> [fixed]", "scatter_gather": "on", "tx_checksum_sctp": "on [fixed]",
>> "tx_vlan_stag_hw_insert": "off [fixed]", "rx_vlan_stag_hw_parse": "off
>> [fixed]", "tx_gso_partial": "off [fixed]", "rx_gro_hw": "off [fixed]",
>> "rx_vlan_stag_filter": "off [fixed]", "large_receive_offload": "off
>> [fixed]", "tx_scatter_gather": "on [fixed]", "rx_checksumming": "on
>> [fixed]", "tx_tcp_segmentation": "on", "netns_local": "on [fixed]",
>> "busy_poll": "off [fixed]", "generic_segmentation_offload": "on",
>> "tx_udp_tnl_segmentation": "off [fixed]", "tcp_segmentation_offload": "on",
>> "l2_fwd_offload": "off [fixed]", "rx_vlan_offload": "off [fixed]",
>> "ntuple_filters": "off [fixed]", "tx_gre_csum_segmentation": "off [fixed]",
>> "tx_nocache_copy": "off [fixed]", "tx_udp_tnl_csum_segmentation": "off
>> [fixed]", "udp_fragmentation_offload": "on", "tx_sctp_segmentation": "on",
>> "tx_sit_segmentation": "off [fixed]", "tx_checksum_fcoe_crc": "off
>> [fixed]", "hw_tc_offload": "off [fixed]", "tx_checksum_ip_generic": "on
>> [fixed]", "tx_fcoe_segmentation": "off [fixed]", "rx_vlan_filter": "off
>> [fixed]", "tx_vlan_offload": "off [fixed]", "receive_hashing": "off
>> [fixed]", "tx_gre_segmentation": "off [fixed]"}, "hw_timestamp_filters":
>> [], "mtu": 65536, "device": "lo", "promisc": false, "timestamping":
>> ["rx_software", "software"], "ipv4": {"broadcast": "host", "netmask":
>> "255.0.0.0", "network": "127.0.0.0", "address": "127.0.0.1"}, "ipv6":
>> [{"scope": "host", "prefix": "128", "address": "::1"}], "active": true,
>> "type": "loopback"}, "ansible_memtotal_mb": 3789,
>> "ansible_ssh_host_key_ecdsa_public":
>> "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJu+faA7+4FvAk/7NM6LMiVmQT4VZywj6yPNPeuFh2bIMk4av+JfbhgFvQyP79gWVnspOxadHBZOpCaEe8G2kDc=",
>> "ansible_device_links": {"masters": {"sda2": ["dm-0", "dm-1"]}, "labels":
>> {}, "ids": {"sr0":
>> ["ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001"], "sda2":
>> ["lvm-pv-uuid-2kUJsQ-G7BV-MbNW-BrZW-WL0f-mjrL-2ZkLq0"], "dm-0":
>> ["dm-name-centos-root",
>> "dm-uuid-LVM-pvPziInAe11HFpC2H3WAcqx4LVHE2KjyS28LXugumw14mfP87MkO28uru0rbGvzC"],
>> "dm-1": ["dm-name-centos-swap",
>> "dm-uuid-LVM-pvPziInAe11HFpC2H3WAcqx4LVHE2KjyHwjjedjNjoG0fzlK58hdWGwz6V6BuN2z"]},
>> "uuids": {"sda1": ["ac6a9318-a9b8-411c-9a1b-000804f1ad82"], "dm-0":
>> ["10f7278c-1721-4553-a9ee-d8a4ffdb96d7"], "dm-1":
>> ["17cf1614-d822-41af-bbd2-589464afc51c"]}}, "ansible_default_ipv4":
>> {"macaddress": "00:50:56:92:fd:33", "network": "10.50.118.0", "mtu": 1500,
>> "broadcast": "10.50.118.255", "alias": "ens160", "netmask":
>> "255.255.255.0", "address": "10.50.118.245", "interface": "ens160", "type":
>> "ether", "gateway": "10.50.118.1"}, "ansible_swapfree_mb": 1639,
>> "ansible_default_ipv6": {}, "ansible_distribution_release": "Core",
>> "ansible_system_vendor": "VMware, Inc.", "ansible_apparmor": {"status":
>> "disabled"}, "ansible_cmdline": {"LANG": "en_US.UTF-8", "BOOT_IMAGE":
>> "/vmlinuz-3.10.0-957.27.2.el7.x86_64", "quiet": true, "rhgb": true, "
>> rd.lvm.lv": "centos/swap", "crashkernel": "auto", "ro": true, "root":
>> "/dev/mapper/centos-root"}, "ansible_effective_user_id": 0,
>> "ansible_user_gid": 0, "ansible_selinux": {"status": "enabled",
>> "policyvers": 31, "type": "targeted", "mode": "enforcing", "config_mode":
>> "enforcing"}, "ansible_product_version": "None", "ansible_os_family":
>> "RedHat", "ansible_userspace_architecture": "x86_64",
>> "ansible_product_uuid": "42123676-5B94-8603-E182-DCF36EE3B4AB",
>> "ansible_system": "Linux", "ansible_pkg_mgr": "yum", "ansible_memfree_mb":
>> 3464, "ansible_devices": {"fd0": {"scheduler_mode": "deadline",
>> "rotational": "1", "vendor": null, "sectors": "8", "links": {"masters": [],
>> "labels": [], "ids": [], "uuids": []}, "sas_device_handle": null,
>> "sas_address": null, "virtual": 1, "host": "", "sectorsize": "512",
>> "removable": "1", "support_discard": "0", "model": null, "partitions": {},
>> "holders": [], "size": "4.00 KB"}, "sr0": {"scheduler_mode": "deadline",
>> "rotational": "1", "vendor": "NECVMWar", "sectors": "2097151", "links":
>> {"masters": [], "labels": [], "ids":
>> ["ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001"], "uuids": []},
>> "sas_device_handle": null, "sas_address": null, "virtual": 1, "host": "IDE
>> interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)",
>> "sectorsize": "512", "removable": "1", "support_discard": "0", "model":
>> "VMware IDE CDR10", "partitions": {}, "holders": [], "size": "1024.00 MB"},
>> "sda": {"scheduler_mode": "deadline", "rotational": "1", "vendor":
>> "VMware", "sectors": "33554432", "links": {"masters": [], "labels": [],
>> "ids": [], "uuids": []}, "sas_device_handle": null, "sas_address": null,
>> "virtual": 1, "host": "SCSI storage controller: LSI Logic / Symbios Logic
>> 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)", "sectorsize": "512",
>> "removable": "0", "support_discard": "0", "model": "Virtual disk",
>> "partitions": {"sda2": {"sectorsize": 512, "uuid": null, "links":
>> {"masters": ["dm-0", "dm-1"], "labels": [], "ids":
>> ["lvm-pv-uuid-2kUJsQ-G7BV-MbNW-BrZW-WL0f-mjrL-2ZkLq0"], "uuids": []},
>> "sectors": "31455232", "start": "2099200", "holders": ["centos-root",
>> "centos-swap"], "size": "15.00 GB"}, "sda1": {"sectorsize": 512, "uuid":
>> "ac6a9318-a9b8-411c-9a1b-000804f1ad82", "links": {"masters": [], "labels":
>> [], "ids": [], "uuids": ["ac6a9318-a9b8-411c-9a1b-000804f1ad82"]},
>> "sectors": "2097152", "start": "2048", "holders": [], "size": "1.00
>> GB"}}, "holders": [], "size": "16.00 GB"}, "dm-0": {"scheduler_mode": "",
>> "rotational": "1", "vendor": null, "sectors": "28090368", "links":
>> {"masters": [], "labels": [], "ids": ["dm-name-centos-root",
>> "dm-uuid-LVM-pvPziInAe11HFpC2H3WAcqx4LVHE2KjyS28LXugumw14mfP87MkO28uru0rbGvzC"],
>> "uuids": ["10f7278c-1721-4553-a9ee-d8a4ffdb96d7"]}, "sas_device_handle":
>> null, "sas_address": null, "virtual": 1, "host": "", "sectorsize": "512",
>> "removable": "0", "support_discard": "0", "model": null, "partitions": {},
>> "holders": [], "size": "13.39 GB"}, "dm-1": {"scheduler_mode": "",
>> "rotational": "1", "vendor": null, "sectors": "3358720", "links":
>> {"masters": [], "labels": [], "ids": ["dm-name-centos-swap",
>> "dm-uuid-LVM-pvPziInAe11HFpC2H3WAcqx4LVHE2KjyHwjjedjNjoG0fzlK58hdWGwz6V6BuN2z"],
>> "uuids": ["17cf1614-d822-41af-bbd2-589464afc51c"]}, "sas_device_handle":
>> null, "sas_address": null, "virtual": 1, "host": "", "sectorsize": "512",
>> "removable": "0", "support_discard": "0", "model": null, "partitions": {},
>> "holders": [], "size": "1.60 GB"}}, "ansible_user_uid": 0, "ansible_lvm":
>> {"pvs": {"/dev/sda2": {"free_g": "0", "size_g": "15.00", "vg": "centos"}},
>> "lvs": {"root": {"size_g": "13.39", "vg": "centos"}, "swap": {"size_g":
>> "1.60", "vg": "centos"}}, "vgs": {"centos": {"free_g": "0", "size_g":
>> "15.00", "num_lvs": "2", "num_pvs": "1"}}}, "ansible_distribution":
>> "CentOS", "ansible_user_dir": "/root", "ansible_dns": {"nameservers":
>> ["10.50.117.39", "10.50.116.123"], "search": ["firstcash.com", "
>> casham.com"]}, "ansible_distribution_major_version": "7",
>> "module_setup": true, "ansible_processor_count": 2, "ansible_hostname":
>> "dvnlx115", "ansible_processor_vcpus": 4, "ansible_swaptotal_mb": 1639,
>> "ansible_lsb": {}, "ansible_real_group_id": 0, "ansible_bios_date":
>> "09/21/2015", "ansible_ens160": {"macaddress": "00:50:56:92:fd:33",
>> "features": {"tx_checksum_ipv4": "off [fixed]", "generic_receive_offload":
>> "on", "tx_checksum_ipv6": "off [fixed]", "tx_scatter_gather_fraglist": "off
>> [fixed]", "rx_all": "off [fixed]", "highdma": "on", "rx_fcs": "off
>> [fixed]", "tx_lockless": "off [fixed]", "tx_tcp_ecn_segmentation": "off
>> [fixed]", "rx_udp_tunnel_port_offload": "off [fixed]",
>> "tx_tcp6_segmentation": "on", "tx_gso_robust": "off [fixed]",
>> "tx_ipip_segmentation": "off [fixed]", "tx_tcp_mangleid_segmentation":
>> "off", "tx_checksumming": "on", "vlan_challenged": "off [fixed]",
>> "loopback": "off [fixed]", "fcoe_mtu": "off [fixed]", "scatter_gather":
>> "on", "tx_checksum_sctp": "off [fixed]", "tx_vlan_stag_hw_insert": "off
>> [fixed]", "rx_vlan_stag_hw_parse": "off [fixed]", "tx_gso_partial": "off
>> [fixed]", "rx_gro_hw": "off [fixed]", "rx_vlan_stag_filter": "off [fixed]",
>> "large_receive_offload": "on", "tx_scatter_gather": "on",
>> "rx_checksumming": "on", "tx_tcp_segmentation": "on", "netns_local": "off
>> [fixed]", "busy_poll": "off [fixed]", "generic_segmentation_offload": "on",
>> "tx_udp_tnl_segmentation": "off [fixed]", "tcp_segmentation_offload": "on",
>> "l2_fwd_offload": "off [fixed]", "rx_vlan_offload": "on", "ntuple_filters":
>> "off [fixed]", "tx_gre_csum_segmentation": "off [fixed]",
>> "tx_nocache_copy": "off", "tx_udp_tnl_csum_segmentation": "off [fixed]",
>> "udp_fragmentation_offload": "off [fixed]", "tx_sctp_segmentation": "off
>> [fixed]", "tx_sit_segmentation": "off [fixed]", "tx_checksum_fcoe_crc":
>> "off [fixed]", "hw_tc_offload": "off [fixed]", "tx_checksum_ip_generic":
>> "on", "tx_fcoe_segmentation": "off [fixed]", "rx_vlan_filter": "on
>> [fixed]", "tx_vlan_offload": "on", "receive_hashing": "on",
>> "tx_gre_segmentation": "off [fixed]"}, "type": "ether", "pciid":
>> "0000:03:00.0", "module": "vmxnet3", "mtu": 1500, "device": "ens160",
>> "promisc": false, "timestamping": ["rx_software", "software"], "ipv4":
>> {"broadcast": "10.50.118.255", "netmask": "255.255.255.0", "network":
>> "10.50.118.0", "address": "10.50.118.245"}, "ipv6": [{"scope": "link",
>> "prefix": "64", "address": "fe80::250:56ff:fe92:fd33"}], "active": true,
>> "speed": 10000, "hw_timestamp_filters": []}, "ansible_all_ipv6_addresses":
>> ["fe80::250:56ff:fe92:fd33"], "ansible_interfaces": ["lo", "ens160"],
>> "ansible_uptime_seconds": 250, "ansible_machine_id":
>> "3d3d3f08c37e439b8250e72612412f52", "ansible_kernel":
>> "3.10.0-957.27.2.el7.x86_64", "ansible_user_gecos": "root",
>> "ansible_system_capabilities_enforced": "True", "ansible_python":
>> {"executable": "/usr/bin/python", "version": {"micro": 5, "major": 2,
>> "releaselevel": "final", "serial": 0, "minor": 7}, "type": "CPython",
>> "has_sslcontext": true, "version_info": [2, 7, 5, "final", 0]},
>> "ansible_processor_threads_per_core": 1, "ansible_fqdn": "
>> dvnlx115.firstcash.com", "ansible_mounts": [{"block_used": 478520,
>> "uuid": "10f7278c-1721-4553-a9ee-d8a4ffdb96d7", "size_total": 14371782656,
>> "block_total": 3508736, "mount": "/", "block_available": 3030216,
>> "size_available": 12411764736, "fstype": "xfs", "inode_total": 7022592,
>> "options": "rw,seclabel,relatime,attr2,inode64,noquota", "device":
>> "/dev/mapper/centos-root", "inode_used": 70872, "block_size": 4096,
>> "inode_available":6951720}, {"block_used": 46446, "uuid":
>> "ac6a9318-a9b8-411c-9a1b-000804f1ad82", "size_total": 1063256064,
>> "block_total": 259584, "mount": "/boot", "block_available": 213138,
>> "size_available": 873013248, "fstype": "xfs", "inode_total": 524288,
>> "options": "rw,seclabel,relatime,attr2,inode64,noquota", "device":
>> "/dev/sda1", "inode_used": 336, "block_size": 4096, "inode_available":
>> 523952}], "ansible_memory_mb": {"real": {"total": 3789, "used": 325,
>> "free": 3464}, "swap": {"cached": 0, "total": 1639, "free": 1639, "used":
>> 0}, "nocache": {"used": 209, "free": 3580}}, "ansible_nodename": "
>> dvnlx115.firstcash.com", "ansible_product_name": "VMware Virtual
>> Platform", "ansible_machine": "x86_64", "ansible_system_capabilities":
>> ["cap_chown", "cap_dac_override", "cap_dac_read_search", "cap_fowner",
>> "cap_fsetid", "cap_kill", "cap_setgid", "cap_setuid", "cap_setpcap",
>> "cap_linux_immutable", "cap_net_bind_service", "cap_net_broadcast",
>> "cap_net_admin", "cap_net_raw", "cap_ipc_lock", "cap_ipc_owner",
>> "cap_sys_module", "cap_sys_rawio", "cap_sys_chroot", "cap_sys_ptrace",
>> "cap_sys_pacct", "cap_sys_admin", "cap_sys_boot", "cap_sys_nice",
>> "cap_sys_resource", "cap_sys_time", "cap_sys_tty_config", "cap_mknod",
>> "cap_lease", "cap_audit_write", "cap_audit_control", "cap_setfcap",
>> "cap_mac_override", "cap_mac_admin", "cap_syslog", "35", "36+ep"],
>> "ansible_all_ipv4_addresses": ["10.50.118.245"], "ansible_python_version":
>> "2.7.5"}}\n', '')
>>
>> ok: [dvlnx115]
>>
>> META: ran handlers
>>
>>
>>
>> TASK [update all packages]
>> **********************************************************************************************************************************
>>
>> task path: /home/meggle1/src/ansible/playbooks/y.yml:13
>>
>> Using module file /home/meggle1/src/ansible/playbooks/yum.retry
>>
>> fatal: [dvlnx115]: FAILED! => {
>>
>>     "msg": "module (yum) is missing interpreter line"
>>
>> }
>>
>> ...ignoring
>>
>> META: ran handlers
>>
>> META: ran handlers
>>
>>
>>
>> PLAY RECAP
>> **************************************************************************************************************************************************
>>
>> dvlnx115                   : ok=2    changed=0    unreachable=0
>> failed=0
>>
>>
>>
>> Mike
>>
>> On Aug 19, 2019, at 09:12, Jonathan Lozada De La Matta <
>> [email protected]> wrote:
>>
>> can you go into more details about missing interpreter line? what ansible
>> version are you using? in what part is ansible unable to connect? I'm
>> assuming after the shutdown -r part?
>>
>> On Mon, Aug 19, 2019 at 10:10 AM Mike Eggleston <[email protected]>
>> wrote:
>>
>>> I first used “package” and ansible complained of a missing interpreter
>>> line. That’s why I switched to “command”.
>>>
>>> I’m going between two CentIS boxes.
>>>
>>> All this doesn’t explain why I can get into the box over ssh, but
>>> ansible cant get into the box.
>>>
>>> Mike
>>>
>>> On Aug 19, 2019, at 09:02, Jonathan Lozada De La Matta <
>>> [email protected]> wrote:
>>>
>>> Mike,
>>>
>>> You should use the yum/apt modules instead of shell/command do what you
>>> are trying to do. Also what version of ansible are you using? You should
>>> also use the OS conditionals to run the tasks depending on the OS.
>>> https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html#commonly-used-facts
>>>  https://docs.ansible.com/ansible/latest/modules/yum_module.html
>>> https://docs.ansible.com/ansible/latest/modules/apt_module.html. you
>>> can also use
>>> https://docs.ansible.com/ansible/latest/modules/package_module.html for
>>> generic package management. If you are using at least ansible 2.7 use the
>>> reboot
>>> https://docs.ansible.com/ansible/latest/modules/reboot_module.html
>>> since it auto connects back.
>>>
>>> On Mon, Aug 19, 2019 at 9:54 AM Mike Eggleston <[email protected]>
>>> wrote:
>>>
>>>> (Doing this on my phone is cumbersome.) :)
>>>>
>>>> Hers the playbook:
>>>>
>>>> [meggle1@dvlnx108 playbooks]$ cat yum.yml
>>>>
>>>> # $Id$
>>>>
>>>> # $Log$
>>>>
>>>>
>>>>
>>>> # use the package manager (yum/apt-get) to update all installed packages
>>>>
>>>> # :!ansible-playbook -u root -k --limit dvlnx115 --syntax-check %
>>>>
>>>> # :!ansible-playbook -u root -k --limit dvlnx115 %
>>>>
>>>> # :!ansible-playbook -vvv -u root -k --limit dvlnx115 %
>>>>
>>>> ---
>>>>
>>>> - hosts: all
>>>>
>>>>   gather_facts: yes
>>>>
>>>>
>>>>
>>>>   tasks:
>>>>
>>>>     - name: checking for yum...
>>>>
>>>>       stat:
>>>>
>>>>         path: /usr/bin/yum
>>>>
>>>>       register: stat_results
>>>>
>>>>       ignore_errors: true
>>>>
>>>>
>>>>
>>>>     - name: update all packages (yum)
>>>>
>>>>       command: yum -y update
>>>>
>>>>       become: yes
>>>>
>>>>       notify:
>>>>
>>>>         - restart server
>>>>
>>>>       when: stat_results.stat.exists
>>>>
>>>>
>>>>
>>>>     - name: update all packages (apt-get)
>>>>
>>>>       shell: apt-get -y update; apt-get -y upgrade
>>>>
>>>>       become: yes
>>>>
>>>>       notify:
>>>>
>>>>         - restart server
>>>>
>>>>       when: not stat_results.stat.exists
>>>>
>>>>
>>>>
>>>>  handlers:
>>>>
>>>>     - name: restart server
>>>>
>>>>       command: shutdown -r now
>>>>
>>>>       become: yes
>>>>
>>>> Mike
>>>>
>>>> On Aug 19, 2019, at 08:40, Jonathan Lozada De La Matta <
>>>> [email protected]> wrote:
>>>>
>>>> Mike,
>>>>
>>>> If you are provisioning a VM, usually you require another play to
>>>> connect to the host. Can you share the playbook/role?
>>>>
>>>> On Mon, Aug 19, 2019 at 9:38 AM Mike Eggleston <[email protected]>
>>>> wrote:
>>>>
>>>>> What’s happening here? I can reach the server over ssh, but ansible
>>>>> can’t? I’m testing a provisioning play. I can ssh into the box with “ssh
>>>>> root@box” but the command “ansible-playbook -vvv -u root -k —limit
>>>>> box yum.yml” says “msg”: “SSH Error:data could not be sent to remote host
>>>>> \”box\”. Make sure this host can be reached over ssh”.
>>>>>
>>>>> Odd. :)
>>>>>
>>>>> What’s happening and how to fix this?
>>>>>
>>>>> Mike
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Ansible Project" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/ansible-project/7A600E52-96DA-455C-9715-A1D62953C6CD%40gmail.com
>>>>> .
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Jonathan Cha'gara Lozada De La Matta
>>>>
>>>> He / Him / His
>>>>
>>>> Red Hat <https://www.redhat.com>
>>>>
>>>> Senior Automation Practice Consultant & Automation CoP Manager
>>>>
>>>> Join the Automation CoP! https://red.ht/autocop
>>>> @redhatjobs <https://twitter.com/redhatjobs>   redhatjobs
>>>> <https://www.facebook.com/redhatjobs> @redhatjobs
>>>> <https://instagram.com/redhatjobs>
>>>> <https://www.redhat.com>
>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Ansible Project" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/ansible-project/CAFYJA%2BJBx9_0VWDDJBNn-Y%2BdAMt3eusmm_2g3aMR4o29M%3DovXw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/ansible-project/CAFYJA%2BJBx9_0VWDDJBNn-Y%2BdAMt3eusmm_2g3aMR4o29M%3DovXw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Ansible Project" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/ansible-project/337D8801-899B-4B46-9D33-3DD22376E20A%40gmail.com
>>>> <https://groups.google.com/d/msgid/ansible-project/337D8801-899B-4B46-9D33-3DD22376E20A%40gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>>>
>>> --
>>>
>>> Jonathan Cha'gara Lozada De La Matta
>>>
>>> He / Him / His
>>>
>>> Red Hat <https://www.redhat.com>
>>>
>>> Senior Automation Practice Consultant & Automation CoP Manager
>>>
>>> Join the Automation CoP! https://red.ht/autocop
>>> @redhatjobs <https://twitter.com/redhatjobs>   redhatjobs
>>> <https://www.facebook.com/redhatjobs> @redhatjobs
>>> <https://instagram.com/redhatjobs>
>>> <https://www.redhat.com>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Ansible Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/CAFYJA%2BL-KTtti4TwCd%3DHkRfhODCm4ya%3DtzNe%3D%2B40kChdORpVUg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/ansible-project/CAFYJA%2BL-KTtti4TwCd%3DHkRfhODCm4ya%3DtzNe%3D%2B40kChdORpVUg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Ansible Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/00D17659-8D62-4DC5-9ED3-94D3F1E61B00%40gmail.com
>>> <https://groups.google.com/d/msgid/ansible-project/00D17659-8D62-4DC5-9ED3-94D3F1E61B00%40gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> --
>>
>> Jonathan Cha'gara Lozada De La Matta
>>
>> He / Him / His
>>
>> Red Hat <https://www.redhat.com>
>>
>> Senior Automation Practice Consultant & Automation CoP Manager
>>
>> Join the Automation CoP! https://red.ht/autocop
>> @redhatjobs <https://twitter.com/redhatjobs>   redhatjobs
>> <https://www.facebook.com/redhatjobs> @redhatjobs
>> <https://instagram.com/redhatjobs>
>> <https://www.redhat.com>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAFYJA%2B%2BVF%2BdDFATfzMq5VN36Z1EFqEJWYZv24pL8U-9b2_9TfA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CAFYJA%2B%2BVF%2BdDFATfzMq5VN36Z1EFqEJWYZv24pL8U-9b2_9TfA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/BF12AF42-77FE-4988-A309-ECC27BE33628%40gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/BF12AF42-77FE-4988-A309-ECC27BE33628%40gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
>
> Jonathan Cha'gara Lozada De La Matta
>
> He / Him / His
>
> Red Hat <https://www.redhat.com>
>
> Senior Automation Practice Consultant & Automation CoP Manager
>
> Join the Automation CoP! https://red.ht/autocop
> @redhatjobs <https://twitter.com/redhatjobs>   redhatjobs
> <https://www.facebook.com/redhatjobs> @redhatjobs
> <https://instagram.com/redhatjobs>
> <https://www.redhat.com>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAFYJA%2BLDkQ7qN-nwG5L6CViLqMhD1PiAT_ULe2tEMMZ2oJpM0g%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAFYJA%2BLDkQ7qN-nwG5L6CViLqMhD1PiAT_ULe2tEMMZ2oJpM0g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/D89AD772-59EF-4B89-B8FB-DA64AC6F3383%40gmail.com
> <https://groups.google.com/d/msgid/ansible-project/D89AD772-59EF-4B89-B8FB-DA64AC6F3383%40gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 

Jonathan Cha'gara Lozada De La Matta

He / Him / His

Red Hat <https://www.redhat.com>

Senior Automation Practice Consultant & Automation CoP Manager

Join the Automation CoP! https://red.ht/autocop
@redhatjobs <https://twitter.com/redhatjobs>   redhatjobs
<https://www.facebook.com/redhatjobs> @redhatjobs
<https://instagram.com/redhatjobs>
<https://www.redhat.com>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFYJA%2B%2BXj3PSwt3ALDV%2BP5qZQ7ikCkwaROe%2BcLunRL9Nmkib%3Dw%40mail.gmail.com.

Reply via email to