Giter Club home page Giter Club logo

cloud.vmware_ops's Introduction

cloud.vmware_ops roles/playbooks for VMware

This repository hosts the cloud.vmware_ops Ansible Collection.

The collection includes a variety of Ansible roles and playbooks to help automate the management of VMware.

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.14.0.

Python version compatibility

This collection requires Python 3.9 or greater.

Included content

Click on the name of a role to view that content's documentation:

Roles

Name Description
cloud.vmware_ops.provision_vcenter A role to provison Vcenter on ESXi host.
cloud.vmware_ops.provision_vm A role to create/manage virtual machines on VMware.
cloud.vmware_ops.system_settings A role to manage system settings on VMware.
cloud.vmware_ops.cluster_settings A role to define cluster settings in vCenter.
cloud.vmware_ops.content_library A role to manage VMWare content libaries.
cloud.vmware_ops.deploy_ovf A role to deploy a VM from an OVF file.
cloud.vmware_ops.esxi_maintenance_mode Either put an ESXI host in maintenance mode or take the host out of maintenance mode.
cloud.vmware_ops.export_vm_as_ovf A role to export a VM from VCenter or ESXi as an OVF.
cloud.vmware_ops.info A role that gather information from vCenter.
cloud.vmware_ops.manage_folder A role to create, delete, or update a folder or folder tree in VCenter.
cloud.vmware_ops.provision_virtual_esxi A role to provision one or more virtual ESXi hosts.
cloud.vmware_ops.snapshot_management A role to manages virtual machines snapshots in vCenter.
cloud.vmware_ops.vcenter_host_connection A role to add, remove, connect, disconnect, or reconnect an ESXi host from a VCenter.

Playbooks

Name Description
cloud.vmware_ops.provision_vcenter A playbook to provison Vcenter on ESXi host.
cloud.vmware_ops.system_settings A playbook to manage system settings on VMware.
cloud.vmware_ops.cluster_settings A set of playbook to manage cluster settings.
cloud.vmware_ops.esxi_management A set of playbooks to manage esxi in a cluster.
cloud.vmware_ops.provision_vcenter A playbook to provision vCenter applicationm on ESXi host.
cloud.vmware_ops.provision_vm A set of playbooks to manage provisioning VM.
cloud.vmware_ops.snapshot_management A set of playbooks to manage VM snapshots on vCenter.
cloud.vmware_ops.export_vm_as_ovf A playbook to export vm as OVF file.
cloud.vmware_ops.info A playbook to gather information from vCenter.
cloud.vmware_ops.manage_content_library A playbook to manage content libraries in vCenter.
cloud.vmware_ops.manage_folder A playbook to manage folders in vCenter.

Installation and Usage

Requirements

The community.vmware (>=4.4.0), vmware.vmware_rest, vmware.vmware, community.general and ansible.posix collections MUST be installed in order for this collection to work.

Installation

To consume this Validated Content from Automation Hub, please ensure that you add the following lines to your ansible.cfg file.

[galaxy]
server_list = automation_hub

[galaxy_server.automation_hub]
url=https://cloud.redhat.com/api/automation-hub/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
token=<SuperSecretToken>

The token can be obtained from the Automation Hub Web UI.

Once the above steps are done, you can run the following command to install the collection.

ansible-galaxy collection install cloud.vmware_ops

Using this collection

Once installed, you can reference the cloud.vmware_ops collection content by its fully qualified collection name (FQCN), for example:

  - hosts: localhost
    roles:
      - role: cloud.vmware_ops.system_settings

See Also

Contributing to this collection

We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against this collection repository.

Testing and Development

The project uses ansible-lint and black. Assuming this repository is checked out in the proper structure, e.g. collections_root/ansible_collections/cloud/vmware_ops/, run:

  tox -e linters

Sanity and unit tests are run as normal:

  ansible-test sanity

Integration Tests

Currently integration tests are using vcsim, which is VMware SOAP API simulator. So no external infrastructure is needed. Vcsim is executed in a podman container before the integration test is executed.

In order to run the integration tests, please follow:

make integration

License

GNU General Public License v3.0 or later

See LICENSE to see the full text.

cloud.vmware_ops's People

Contributors

mikemorency avatar shellymiron avatar machacekondra avatar anna-savina avatar bardielle avatar elsapassaro avatar vvaldez avatar prabinovredhat avatar jeffmcutter avatar

Stargazers

 avatar

Watchers

Pelisse Romain avatar Jared Burck avatar Adam Miller avatar Andrew Block avatar Ashwini Mhatre avatar Lester Claudio avatar Roel Hodzelmans avatar Thom Carlin avatar Juerg Ritter avatar Eric L. avatar  avatar Helen Bailey avatar Øystein Bedin avatar Gareth Healy avatar Tom Page avatar Trishna Guha avatar Harsha Cherukuri avatar Nilashish Chakraborty avatar Sagar Paul avatar  avatar

cloud.vmware_ops's Issues

cloud.vmware_ops.info make sure directory exists requires community.general

This is the error->

➜  vmware-demos git:(main) ansible-navigator run vmware_visbility.yml --mode stdout
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [VMware visbility] *******************************************************************************************************************************************************

TASK [Set VCenter parameters] *************************************************************************************************************************************************
ok: [localhost]

TASK [cloud.vmware_ops.info : License info] ***********************************************************************************************************************************
included: /usr/share/ansible/collections/ansible_collections/cloud/vmware_ops/roles/info/tasks/license_info.yml for localhost

TASK [cloud.vmware_ops.info : Fetch the license information] ******************************************************************************************************************
ok: [localhost]

TASK [cloud.vmware_ops.info : Make sure directory exists] *********************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "An unhandled exception occurred while templating '/tmp/license-{{ lookup('community.general.random_string', special=false) }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: lookup plugin (community.general.random_string) not found"}

The playbook is super simple:

---
- name: VMware visbility
  hosts: localhost
  gather_facts: false
  tasks:
    - name: Set VCenter parameters
      ansible.builtin.include_vars: login_info.yml

    - name: Use info role
      ansible.builtin.import_role:
        name: cloud.vmware_ops.info
      vars:
        info_license: true
        info_storage: true
        info_appliance: true
        info_guest: true
        info_hostname: "{{ vcenter_hostname }}"
        info_username: "{{ vcenter_username }}"
        info_password: "{{ vcenter_password }}"
        info_validate_certs: false

Query about Automation Hub availability for cloud.vmware_ops

Morning, I noticed this collection pop up in automation hub a couple of months or so ago, and have been trying to build an execution environment containing it referencing the automation hub, but as it has community dependencies that are not present in the hub, I get errors from ansible-builder about failing to resolve dependencies.

I can build an ee if I reference the necessary collections in github, but don't really want to do that as it muddies the waters around whether I'm running a supported config or no for our Ansible Automation Platform support contract with Red Hat.

So my question is, is this intended to be a supported collection available on automation hub, and I just need to badger Red Hat support to get it working, or is it up there in error?

Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.