简体   繁体   中英

How to add remote hosts in Ansible AWX/Tower?

I'm setting up Ansible AWX and so far it's been working nicely.
Although when I'm trying to add remote hosts (eg hosts that is NOT localhost) the playbook fails, even though it's possible to ssh from the machine running AWX to the nodes.

The node to be configured was added to an inventory , and under the inventory i added it as a host . I used the IP-address ad the hostname:

Then run the job:

If I try to run `ansible -m ping all from CLI:

root@node1:/home/ubuntu# ansible -m ping all
...
10.212.137.189 | SUCCESS => {
    "changed": false, 
    "ping": "pong"
}
...

It seems a problem related to ssh credentials. Have you correctly configured credentials on AWX/Tower?

You need to configure credential, type "Machine": follow documentation here Ansible Tower User Guide - Credentials

From ansible command line you can ping hosts because probably you have already copied ssh-keys on remote hosts, but AWX/Tower settings are independent from it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM