Files
wskill/Настройки ansible.txt

20 lines
653 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

установка ansible
apt-get update
apt-get install ansible
если потребуется:
apt-get install python-module-pip
pip install simplejson
заходим в /etc/ansible/ansible.cfg
Меняем на наш инвентори файл
Заполняем его следующим содержанием:
inventory = /etc/ansible/inventory.txt
Создаем inventory файл
vim /etc/ansible/inventory.txt
Заполняем его по примеру:
[Server]
SRV-HQ ansible_host=10.0.0.2 ansible_user=user ansible_pass=resu
И так далее
Для проверки хостов
ansible all --list-hosts