Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xlab-si/ansible-role-nuagex
Ansible role that contains Ansible modules needed to provision NuageX sandbox
https://github.com/xlab-si/ansible-role-nuagex
Last synced: 20 days ago
JSON representation
Ansible role that contains Ansible modules needed to provision NuageX sandbox
- Host: GitHub
- URL: https://github.com/xlab-si/ansible-role-nuagex
- Owner: xlab-si
- Created: 2018-11-07T12:53:46.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-23T23:22:35.000Z (about 3 years ago)
- Last Synced: 2024-04-21T03:18:38.031Z (8 months ago)
- Language: Python
- Size: 23.4 KB
- Stars: 3
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![coverage](https://img.shields.io/badge/python-2.7%20|%203.6-blue.svg)
# Ansible role: xlab_si.nuagex
This role provides an Ansible module `nuagex_lab` which ensures that desired
[NuageX sandbox](https://experience.nuagenetworks.net) is there for you.## Requirements & Dependencies
There are no specific requirements or dependencies for this role. Just point to
it in your playbook and enjoy the awesomeness of the `nuagex_lab:` module.## Example Playbook
Suppose we want to have NuageX sandbox named 'My Sandbox' available. We don't
care what lab template is used so first available will be taken, alphabetically
sorted:```yaml
- hosts: localhost
connection: local
gather_facts: no
roles:
- xlab_si.nuagex # contains nuagex_lab: module
tasks:
- name: Ensure NuageX lab named 'My Sandbox' is running
nuagex_lab:
name: My Sandbox
state: present
register: lab
```Playbook assumes there are `NUX_USERNAME` and `NUX_PASSWORD` environment variables
defined upon playbook execution to authenticate against NuageX service. It's also
possible to authenticate by means of `{{ nuagex_auth }}` dict variable, see module
documentation for examples.Module result contains all the connection information (endpoints, ports, credentials
etc.) needed to use the NuageX lab.Now suppose we want to make sure the NuageX sandbox named 'My Sandbox' is
destroyed:```yaml
- hosts: localhost
connection: local
gather_facts: no
roles:
- xlab_si.nuagex # contains nuagex_lab: module
tasks:
- name: Ensure NuageX lab named 'My Sandbox' is running
nuagex_lab:
name: My Sandbox
state: absent
```## Module documentation
Please consult `nuagex_lab:` module documentation for supported module arguments.
Since this module isn't part of global Ansible modules, you need to access
documentation locally as opposed to web docs:```
ansible-doc nuagex_lab -M roles/xlab_si.nuagex/library
```or read it directly from the [module soruce code](./library/nuagex_lab.py).