What Should I Do When the "Do not use the delegate_to, connection, hosts command in the Ansible PlayBook script for executing the local computer" message Is displayed When Running Ansible?
Symptom
The error message "Do not use the delegate command in the Ansible PlayBook script for executing the local computer" is displayed when running the Ansible action.
Cause Analysis
The user's Ansible file contains the hosts, delegate_to, or/and connection syntax and a specified host for execution such as localhost, 127.0.0.1.
Solution
The Ansible file cannot contain the local_action command.
Delete the IP address or host name of the local host from the delegate_to syntax.
- If there are multiple IP addresses or host names, delete the local IP address and host name and retain others.
- If there is only the IP address or host name of the local host, delete the entire line of delegate_to syntax.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot