Chapter 4. Deprovisioning individual nodes or groups
Chapter 4. Deprovisioning individual nodes or groups You can deprovision automation mesh nodes and instance groups using the Ansible Automation Platform installer. The procedures in this section describe how to deprovision specific nodes or entire groups, with example inventory files for each procedure. 4.1. Deprovisioning individual nodes using the installer You can deprovision nodes from your automation mesh using the Ansible Automation Platform installer. Edit the inventory file to mark the nodes to deprovision, then run the installer. Running the installer also removes all configuration files and logs attached to the node. Note You can deprovision any of your inventory's hosts except for the first host specified in the [automationcontroller] group. Procedure Append node_state=deprovision to nodes in the installer file you want to deprovision. Example This example inventory file deprovisions two nodes from an automation mesh configuration. [automationcontroller] 126-addr.tatu.home ansible_host=192.168.111.126 node_type=control 121-addr.tatu.home ansible_host=192.168.111.121 node_type=hybrid routable_hostname=121-addr.tatu.home 115-addr.tatu.home ansible_host=192.168.111.115 node_type=hybrid node_state=deprovision [automationcontroller:vars] peers=connected_nodes [execution_nodes] 110-addr.tatu.home ansible_host=192.168.111.110 receptor_listener_port=8928 108-addr.tatu.home ansible_host=192.168.111.108 receptor_listener_port=29182 node_state=deprovision 100-addr.tatu.home ansible_host=192.168.111.100 peers=110-addr.tatu.home node_type=hop 4.1.1. Deprovisioning isolated nodes You have the option to manually remove any isolated nodes using the awx-manage deprovisioning utility. Warning Use the deprovisioning command to remove only isolated nodes that have not migrated to execution nodes. To deprovision execution nodes from your automation mesh architecture, use the installer method instead. Procedure Shut down the instance: USD automation-controller-service stop Run the deprovision command from another instance, replacing host_name with the name of the node as listed in the inventory file: USD awx-manage deprovision_instance --hostname= <host_name> 4.2. Deprovisioning groups using the installer You can deprovision entire groups from your automation mesh using the Ansible Automation Platform installer. Running the installer will remove all configuration files and logs attached to the nodes in the group. Note You can deprovision any hosts in your inventory except for the first host specified in the [automationcontroller] group. Procedure Add node_state=deprovision to the [group:vars] associated with the group you want to deprovision. Example 4.2.1. Deprovisioning isolated instance groups You have the option to manually remove any isolated instance groups using the awx-manage deprovisioning utility. Warning Use the deprovisioning command to only remove isolated instance groups. To deprovision instance groups from your automation mesh architecture, use the installer method instead. Procedure Run the following command, replacing <name> with the name of the instance group: USD awx-manage unregister_queue --queuename= <name>
[automationcontroller] 126-addr.tatu.home ansible_host=192.168.111.126 node_type=control 121-addr.tatu.home ansible_host=192.168.111.121 node_type=hybrid routable_hostname=121-addr.tatu.home 115-addr.tatu.home ansible_host=192.168.111.115 node_type=hybrid node_state=deprovision [automationcontroller:vars] peers=connected_nodes [execution_nodes] 110-addr.tatu.home ansible_host=192.168.111.110 receptor_listener_port=8928 108-addr.tatu.home ansible_host=192.168.111.108 receptor_listener_port=29182 node_state=deprovision 100-addr.tatu.home ansible_host=192.168.111.100 peers=110-addr.tatu.home node_type=hop automation-controller-service stop awx-manage deprovision_instance --hostname= <host_name> [execution_nodes] execution-node-1.example.com peers=execution-node-2.example.com execution-node-2.example.com peers=execution-node-3.example.com execution-node-3.example.com peers=execution-node-4.example.com execution-node-4.example.com peers=execution-node-5.example.com execution-node-5.example.com peers=execution-node-6.example.com execution-node-6.example.com peers=execution-node-7.example.com execution-node-7.example.com [execution_nodes:vars] node_state=deprovision awx-manage unregister_queue --queuename= <name>