Skip to content

Latest commit

 

History

History

openstack_vm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Role: OpenStack VM

Manages OpenStack VMs.

Description

This role will provision and remove OpenStack VMs.

Requirements

Ansible Collections:

collections:
  - name: openstack.cloud
    version: 2.1.0

Role Variables

OpenStack VM role parameters

Parameter Comments
rhos_auth
map / required
Map with the authentication
rhos_auth_type
$\color{fuchsia}{\textsf{map}}$ / $\color{red}{\textsf{required}}$
RHOS Authentication type 1)
openstack_security_group
$\color{fuchsia}{\textsf{map}}$ / $\color{red}{\textsf{required}}$
Security group
state
$\color{fuchsia}{\textsf{map}}$ / $\color{red}{\textsf{required}}$
State of the VM
* present
* absent
vm_name
$\color{fuchsia}{\textsf{map}}$ / $\color{red}{\textsf{required}}$
Name of the VM to be created
openstack_vm_auto_floating_ip
$\color{fuchsia}{\textsf{string}}$
Auto associate a Floating IP
* false <= Default
* true

1) More information on the available keystone plugins on the RHOS documentation.

The rhos_auth Map parameter must contain the required attributes for a successfull authentication as selected with the rhos_auth_type variable.

For a v3password authentication the required contents are the following.

Name Comments
auth_url
$\color{fuchsia}{\textsf{map}}$ / $\color{red}{\textsf{required}}$
Service authentication URL
password
$\color{fuchsia}{\textsf{map}}$ / $\color{red}{\textsf{required}}$
Console login user
project_domain_name
$\color{fuchsia}{\textsf{map}}$ / $\color{red}{\textsf{required}}$
Project domain
project_name
$\color{fuchsia}{\textsf{map}}$ / $\color{red}{\textsf{required}}$
Tenant domain
user_domain_name
$\color{fuchsia}{\textsf{map}}$ / $\color{red}{\textsf{required}}$
User domain
username
$\color{fuchsia}{\textsf{map}}$ / $\color{red}{\textsf{required}}$
Console login user

Output:

  • openstack_vm_ipv4
  • openstack_output

Example Playbook

- name: "Create VM on OpenStack"
  hosts: localhost
  gather_facts: True

  tasks:
    - name: "Create VM"
      ansible.builtin.include_role:
        name: "snowdrop.cloud_infra.openstack_vm"
        vars:
          state: present
          vm_name: snowdrop-vm

License

Apache License 2.0

Author Information

This role has been created by the Snowdrop team.