Add all hosts to /etc/hosts on each host

master
Vitaliy Filippov 2020-03-17 19:38:34 +03:00
parent 3e14430b54
commit 61a1817846
3 changed files with 11 additions and 1 deletions

View File

@ -19,12 +19,12 @@
+ Настроить live миграцию при reschedule: https://github.com/OpenNebula/one/blob/612300b191224b172fa4511845f2a17faa5f547c/src/scheduler/etc/sched.conf#L99
+ Везде убрать DHCP
+ Удалять network-manager
+ Везде прописать все ноды в /etc/hosts
## TODO
- sensors & sensors-exporter
- Убрать quiet из опций GRUB
- Везде прописать все ноды в /etc/hosts
- Добавить passwordless ssh от рута между всеми серверами (чисто для удобства, oneadmin и так есть)
- Добавить аналог inventory (перечень хостов с их переменными)
- Шаблонизировать mon_initial_members в ceph.conf (?)

6
etc/hosts.add Normal file
View File

@ -0,0 +1,6 @@
192.168.5.12 mature2
192.168.5.13 mature3
192.168.5.14 ripper4
192.168.5.15 ripper5
192.168.5.16 ripper6
192.168.5.17 ripper7

View File

@ -60,3 +60,7 @@ elif ! grep -q '^PermitRootLogin without-password' /etc/ssh/sshd_config; then
service ssh restart
fi
EOF
(ssh root@$play_host 'cat /etc/hosts'; grep -v $node_name etc/hosts.add) | sort | uniq > tmp$$
scp tmp$$ root@$play_host:/etc/hosts
rm tmp$$