cloudmesh_client.deployer.ansible package

Submodules

cloudmesh_client.deployer.ansible.inventory module

class cloudmesh_client.deployer.ansible.inventory.Inventory[source]

Bases: object

Build an inventory by dynamically adding :class:`Host`s to :class:`Group`s

add_node(node, *groupnames)[source]

Add a host to the inventory

Parameters:
  • groupname (str) –
  • host (Node) –
classmethod from_cluster(cluster)[source]

Creates an inventory from a Cluster

Parameters:
  • cls
  • cluster
Returns:

Return type:

ini()[source]

Generates the ansible inventory file

Returns:the inventory as ini format
Return type:str
class cloudmesh_client.deployer.ansible.inventory.Node(name, address=None, user=None)[source]

Bases: object

add_var(key, value)[source]

Add a variable and value to a node

Parameters:
  • key (str) –
  • value (str) –
address
name
user
variables

Get the dictionary of variables

Return type:dict

cloudmesh_client.deployer.ansible.playbook module

class cloudmesh_client.deployer.ansible.playbook.AnsiblePlaybook(inventory, roles=None, path=None, username=None, become=False, become_user=None, forks=None, modifyKnownHosts=True, extra_vars=None, subprocess_kwargs=None)[source]

Bases: object

run()[source]

cloudmesh_client.deployer.ansible.role module

class cloudmesh_client.deployer.ansible.role.AnsibleRole(uri, hosts='all', become=True, variables=None, group='all')[source]

Bases: object

Module contents

class cloudmesh_client.deployer.ansible.AnsibleDeployer(roles=None, inventory=None)[source]

Bases: object

generate_playbook()[source]
run()[source]