This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
сервис_ansible [2025/02/11 14:00] val [Роль OpenVPN сервера] |
сервис_ansible [2025/03/15 16:44] (current) val [Использование модулей] |
||
---|---|---|---|
Line 108: | Line 108: | ||
node1# ansible all -m ping | node1# ansible all -m ping | ||
node1# ansible all -m ping -i inv_file.ini | node1# ansible all -m ping -i inv_file.ini | ||
- | node1# ansible all -m ping -i node2:2222, -e "ansible_python_interpreter=/usr/bin/python3" | + | node1# ansible all -m ping -i node2:2222, |
node1# ansible corpX -m command -a 'uname -a' | node1# ansible corpX -m command -a 'uname -a' | ||
- | kube1# ansible kubes -a 'sed -i"" -e "/swap/s/^/#/" /etc/fstab' | ||
- | kube1# ansible kubes -a 'swapoff -a' | ||
- | ИЛИ | ||
(venv1) server# ansible all -a 'sed -i"" -e "/swap/s/^/#/" /etc/fstab' -i /root/kubespray/inventory/mycluster/hosts.yaml #--limit=kube4,kube5 | (venv1) server# ansible all -a 'sed -i"" -e "/swap/s/^/#/" /etc/fstab' -i /root/kubespray/inventory/mycluster/hosts.yaml #--limit=kube4,kube5 | ||
(venv1) server# ansible all -a 'swapoff -a' -i /root/kubespray/inventory/mycluster/hosts.yaml #--limit=kube4 | (venv1) server# ansible all -a 'swapoff -a' -i /root/kubespray/inventory/mycluster/hosts.yaml #--limit=kube4 |