Hi all,
I am pretty new to Ansible and I have been tasked with coming up with a playbook to do the following:
1. connect to our various VC's can create a snapshot of the servers
2. check if physical or virtual
3. verify which version of Red Hat we are running either 6 or 7Â
4. Patch the server and any issues push the errors out to a file
Sounds pretty easy we have over 1000 Rhel servers in physical and virtual format. I am creating the playbook on a Red Hat 7 Server running Rhel7.3, ansible-.2.0.0.1, python-pysphere-0.1.8.1, python2-pyvmomi-6.5-1.
I already have my inventory of all my servers. Not an Issue
Ansible is running fine. Not an issue
python-pyvomomi. Appears to be running fine with certain mod's
Python-pysphere. Having issues with.Â
1. is there a way to verify this is working (As I continue to get module required after each run)Â
2. Is there another way to create snapshots of the Virtual Machines  ( We are running Vmware 6.2 right now)
Here is a simple script and the results.
- hosts: localhost
  tasks:
   - vsphere_guest:
     vcenter_hostname: virtualCenterName
     username: someuser
     password: somepassword
     guest: servername
     vmware_guest_facts: yes
This is my results:
fatal: [localhost]: FAILED! => {
  "changed": false,Â
  "failed": true,Â
  "invocation": {
    "module_args": {
      "cluster": null,Â
      "esxi": {},Â
      "force": false,Â
      "from_template": null,Â
      "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",Â
      "power_on_after_clone": true,Â
      "resource_pool": null,Â
      "snapshot_to_clone": null,Â
      "state": "present",Â
      "template_src": null,Â
      "username": "gartner\\rgarrow-admin",Â
      "validate_certs": true,Â
      "vm_disk": {},Â
      "vm_extra_config": {},Â
      "vm_hardware": {},Â
      "vm_hw_version": null,Â
      "vm_nic": {},Â
      "vmware_guest_facts": true
    }
  },Â
  "msg": "pysphere module required"
I am at a stand still for this so any help someone could pass on would be greatly appreciated. any references to Ansible and Red Hat would be helpful as well I have no problem reading information and learning new ways. There just does not seem to be a lot. I know if I was running ubuntu I would have not issues, plenty of info.. thanks.