This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
сервис_ansible [2024/03/25 06:40] val [Роль настроенного через ifupdown узла сети] |
сервис_ansible [2024/04/22 16:45] val [Дополнительные материалы] |
||
---|---|---|---|
Line 116: | Line 116: | ||
node1# ansible corpX -f 2 -m apt -a 'pkg=apache2 state=present update_cache=true' | node1# ansible corpX -f 2 -m apt -a 'pkg=apache2 state=present update_cache=true' | ||
- | node1# ansible addnodes -vv -f 5 -m apt -a 'pkg=ceph,tgt-rbd state=present update_cache=true' | + | node1# ansible addnodes -vv -f 5 -m apt -a 'pkg=ceph,tgt-rbd state=present update_cache=true' #-e 'https_proxy=http://radio.specialist.ru:3128/' -e 'http_proxy=http://radio.specialist.ru:3128/' |
server# ansible nodes -f 3 -m apt -a 'pkg=openvpn state=present update_cache=true' | server# ansible nodes -f 3 -m apt -a 'pkg=openvpn state=present update_cache=true' | ||
Line 792: | Line 792: | ||
====== Дополнительные материалы ====== | ====== Дополнительные материалы ====== | ||
+ | |||
+ | ===== Вместо ansible ===== | ||
<code> | <code> | ||
- | выполнение команд на цисках через ансибл | + | for i in 1 2 3; do ssh node$i "apt update && apt install apache2; done |
+ | </code> | ||
+ | ===== выполнение команд на цисках через ансибл ===== | ||
+ | <code> | ||
1. добавить в /etc/ansible/group_vars/all.yml строки | 1. добавить в /etc/ansible/group_vars/all.yml строки | ||
ansible_connection: network_cli | ansible_connection: network_cli |