Найти в Дзене

Настройка хостов Ansible на ALT

Устанавливаем ansible и sshpass(для автоматической передачи паролей)
apt-get install ansible sshpass -y Настроим конфигурационный файл:
vim /etc/ansible/ansible.cfg [defaults]
inventory = /etc/ansible/hosts
host_key_checking = False
interpreter_python=auto_silent Заполняем инвентарь:
vim /etc/ansible/hosts [servers]
"имя" ansible_host="Адрес устройства" ansible_user=user ansible_password=user
"имя" ansible_host="Адрес устройства" ansible_user=user ansible_password=user
"имя" ansible_host="Адрес устройства" ansible_user=user ansible_password=user
"имя" ansible_host="Адрес устройства" ansible_user=user ansible_password=user ansible_port=322 Проверка:
ansible all -m ping

Устанавливаем ansible и sshpass(для автоматической передачи паролей)
apt-get install ansible sshpass -y

Настроим конфигурационный файл:
vim /etc/ansible/ansible.cfg

[defaults]
inventory = /etc/ansible/hosts
host_key_checking = False
interpreter_python=auto_silent

Заполняем инвентарь:
vim /etc/ansible/hosts

[servers]
"имя" ansible_host="Адрес устройства" ansible_user=user ansible_password=user
"имя" ansible_host="Адрес устройства" ansible_user=user ansible_password=user
"имя" ansible_host="Адрес устройства" ansible_user=user ansible_password=user
"имя" ansible_host="Адрес устройства" ansible_user=user ansible_password=user ansible_port=322

Проверка:
ansible all -m ping