ansible Package

actions Module

class kolla_cli.common.ansible.actions.KollaAction(verbose_level=0, playbook_name='')

Bases: object

Kolla Action.

certificate_init()

Creates a self-signed certificate

check(hostnames=[], servicenames=[])

Do post-deployment smoke tests.

deploy(hostnames=[], serial_flag=False, servicenames=[])

Deploy and start all kolla containers.

destroy_hosts(hostnames, destroy_type, include_data=False, remove_images=False)

destroy containers on a set of hosts.

The containers on the specified hosts will be stopped or killed.

genconfig(hostnames=[], servicenames=[])

Generate configuration files for enabled OpenStack services

postdeploy()

Do post deploy on deploy node.

precheck(hostnames=[], servicenames=[])

run check playbooks on a set of hosts

pull(hostnames=[], servicenames=[])

run pull action against all hosts

reconfigure(hostnames=[], servicenames=[])

Reconfigure OpenStack service.

stop(hostnames=[], servicenames=[])

stop containers on a set of hosts.

The containers on the specified hosts will be stopped or killed if the stop takes over 20 seconds.

upgrade(hostnames=[], servicenames=[])

Upgrades existing OpenStack Environment.

job Module

class kolla_cli.common.ansible.job.AnsibleJob(cmd, deploy_id, print_output, inventory_path)

Bases: object

class for running ansible commands

get_command_output()

get command output

get final output text from command execution

get_error_message()

“get error message

get_status()

get process status

status: - None: running - 0: done, success - 1: done, error - 2: done, killed by user

kill()

kill job in progress

The process pid is owned by root, so that is not killable. Need to kill all its children.

run()
wait()

wait for job to complete

return status of job (see get_status for status values)

playbook Module

class kolla_cli.common.ansible.playbook.AnsiblePlaybook

Bases: object

become_user = None
deploy_id = None
extra_vars = ''
flush_cache = True
groups = None
hosts = None
ignore_error_strings = None
include_passwords = True
inventory = None
local_only = False
playbook_path = ''
print_output = True
run()
serial = False
services = None
verbose_level = 0

utils Module

kolla_cli.common.ansible.utils.check_kolla_args(hostnames=[], servicenames=[])