3
- We need to generate hash on one of the nodes (using standard passwd command) and, then:
4
* Distribute this password across the cluster:
5
ansible cluster -u root -m user -a 'name=guest password=$6$ti1Img3Z$8mqZD6QCX2TM4cf3lTybTj8pOEMyAAbFRyqkMyPuZC4T4MCTE66otXb4E.raJeCT/78VVZQiV/yaBHdvQQBYz0'
6
* Distribute a special profile configuring the account for cluster
7
ansible cluster -u root -m copy -a "src=guest_profile dest=/home/guest/.profile"
8
This should be a normal profile, just including the cluster profile from clustered home.
9
Add in the beginning the following line:
10
. /pdv/home/guest/.profile
16
ansible cluster -u root -m zypper -a 'name=openmpi-devel'
19
ansible cluster -u root -m zypper -a 'name=openmpi state=absent'
21
- Configure repository
22
ansible cluster -u root -m zypper_repository -a 'name=OFED repo=http://download.opensuse.org/repositories/OFED:/Factory/openSUSE_Factory/OFED:Factory.repo'
23
With current version of ansible, the repository key will be not accepted
24
and the packages from repository will not be installed, unless gpg key
25
checking is disabled. This is achieved with:
26
ansible cluster -u root -m zypper -a 'name=openmpi-devel disable_gpg_check=yes'
31
- Adding a new service
32
ansible cluster -u root -m service -a 'name=rpcbind enabled=yes state=started'
36
- Run arbitrary non-interactive application
37
ansible cluster -u root -m command -a "systemctl restart sshd"
39
- Execute shell command
40
ansible cluster -u root -m shell -a "( cd software; tar xzf *.tgz )"
42
- Copy file to all nodes
43
ansible cluster -u root -m copy -a "src=guest_profile dest=/home/guest/.profile"