|
|
2 dagar sedan | |
|---|---|---|
| .. | ||
| README.md | 2 dagar sedan | |
| hosts | 2 dagar sedan | |
Make climc as an ansible inventory source.
Edit /etc/ansible/hosts
#!/bin/bash
export OS_USERNAME=sysadmin
export OS_PASSWORD=<password>
export OS_PROJECT_NAME=system
export OS_DOMAIN_NAME=Default
export OS_AUTH_URL=http://10.168.200.246:5000/v3
export OS_REGION_NAME=YunionHQ
/opt/yunion/bin/climc ansible-hosts --port 22 --user yunion --private-key $HOME/priv-key --user-become root $@
Make /etc/ansible/hosts executable
chmod +x /etc/ansible/hosts
Try
ansible-inventory --list
ansible-inventory --host <hostname>