ironic.drivers.modules.ansible.deploy module

Ansible deploy interface

class ironic.drivers.modules.ansible.deploy.AnsibleDeploy(*args, **kwargs)[source]

Bases: ironic.drivers.modules.agent_base.HeartbeatMixin, ironic.drivers.modules.agent_base.AgentOobStepsMixin, ironic.drivers.base.DeployInterface

Interface for deploy-related actions.

clean_up(task)[source]

Clean up the deployment environment for this node.

collect_deploy_logs = False
deploy(task)[source]

Perform a deployment to a node.

execute_clean_step(task, step)[source]

Execute a clean step.

Parameters
  • task – a TaskManager object containing the node

  • step – a clean step dictionary to execute

Returns

None

get_clean_steps(task)[source]

Get the list of clean steps from the file.

Parameters

task – a TaskManager object containing the node

Returns

A list of clean step dictionaries

get_properties()[source]

Return the properties of the interface.

in_core_deploy_step(task)[source]

Check if we are in the deploy.deploy deploy step.

Assumes that we are in the DEPLOYWAIT state.

Parameters

task – a TaskManager instance

Returns

True if the current deploy step is deploy.deploy.

prepare(task)[source]

Prepare the deployment environment for this node.

prepare_cleaning(task)[source]

Boot into the ramdisk to prepare for cleaning.

Parameters

task – a TaskManager object containing the node

Raises

NodeCleaningFailure – if the previous cleaning ports cannot be removed or if new cleaning ports cannot be created

Returns

None or states.CLEANWAIT for async prepare.

process_next_step(task, step_type)[source]

Start the next clean/deploy step if the previous one is complete.

Parameters
  • task – a TaskManager instance

  • step_type – “clean” or “deploy”

take_over(task)[source]

Take over management of this task’s node from a dead conductor.

If conductors’ hosts maintain a static relationship to nodes, this method should be implemented by the driver to allow conductors to perform the necessary work during the remapping of nodes to conductors when a conductor joins or leaves the cluster.

For example, the PXE driver has an external dependency:

Neutron must forward DHCP BOOT requests to a conductor which has prepared the tftpboot environment for the given node. When a conductor goes offline, another conductor must change this setting in Neutron as part of remapping that node’s control to itself. This is performed within the takeover method.

Parameters

task – A TaskManager instance containing the node to act on.

tear_down(task)[source]

Tear down a previous deployment on the task’s node.

tear_down_agent(task)[source]

A deploy step to tear down the agent.

Shuts down the machine and removes it from the provisioning network.

Parameters

task – a TaskManager object containing the node

tear_down_cleaning(task)[source]

Clean up the PXE and DHCP files after cleaning.

Parameters

task – a TaskManager object containing the node

Raises

NodeCleaningFailure – if the cleaning ports cannot be removed

validate(task)[source]

Validate the driver-specific Node deployment info.

write_image(task)[source]
exception ironic.drivers.modules.ansible.deploy.PlaybookNotFound(message=None, **kwargs)[source]

Bases: ironic_lib.exception.IronicException