Ansible: различия между версиями
Материал из Etersoft wiki
Перейти к навигацииПерейти к поиску
(Новая страница: «https://habrahabr.ru/post/195048/ Ansible — yet another система управления конфигурациями. == Установка == epmi an…») |
|||
Строка 1: | Строка 1: | ||
[https://habrahabr.ru/post/195048/ Ansible] — yet another система управления конфигурациями. | |||
== Установка == | == Установка == | ||
Строка 85: | Строка 85: | ||
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue. | It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue. | ||
</pre> | </pre> | ||
== Ссылки == | |||
* [http://bugs.etersoft.ru/show_bug.cgi?id=10697] |
Версия 19:08, 28 марта 2016
Ansible — yet another система управления конфигурациями.
Установка
epmi ansible ansible-shell
Настройка
Включить копирование файлов
cd /etc/ansible diff ansible.cfg ansible.cfg.rpmnew 209c209 < scp_if_ssh = True --- > #scp_if_ssh = True
Указать список машин
[gluster] server snail cellar asu multi vbox lav lin-test euclid nun windsor space1 [clients] ant grape [test] ant [pc] asu atlant buh cellar euclid grape lav lin-test multi nun server snail testing virtualbox windsor azbykar devel host03 priv router space1 space2
Запуск
- Посмотреть доступную память
ansible pc -m shell -a 'sudo dmidecode --type memory | egrep "(Size:*|Type: DDR*)" | egrep -v "(Installed S |Enabled|Not I)" | sort | uniq -c'
- Установить nano
ansible test -m shell -a 'sudo epmu; sudo epmi nano'
Пример вывода
ansible pc -m shell -a 'sudo dmidecode --type memory | egrep "(Size:*|Type: DDR*)" | egrep -v "(Installed S |Enabled|Not I)" | sort | atlant | success | rc=0 >> 2 Installed Size: 512 MB (Double-bank Connection) 1 Maximum Memory Module Size: 1024 MB 1 Maximum Total Memory Size: 2048 MB 2 Size: 512 MB buh | FAILED => SSH Error: ssh: connect to host buh port 22: No route to host while connecting to 192.168.0.49:22 It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.