Commit 8fe13dd1 authored by yuancun.nie's avatar yuancun.nie

Update README.md

parent 74b71252
......@@ -91,13 +91,18 @@ Be aware that the development branches here are not save and the owner might for
# Run as admin
## Bootstraping
* Enable SSH on the new host (`lasXXX$ sudo systemctl start sshd && sudo systemctl enable sshd`)
* Connect to the ansible server (`lasXXX$ ssh nie@obelix.las.kit.edu`)
* Become root (`obelix$ sudo -s`)
* Add your SSH-key to the host `obelix# ssh-copy-id lasXXX.las.kit.edu`
* Probably you have to copy it by hand (copy the content of your key e.g. `~/.ssh/id_rsa.pub` to the new computer root's `~/.ssh/authorized_keys` file and set the access rights to 600)
* In case it does not work, you have to copy it by hand (copy the content of your key e.g. `~/.ssh/id_rsa.pub` to the new computer root's `~/.ssh/authorized_keys` file and set the access rights to 600)
* and enable Key-based root login. (in `/etc/ssh/sshd_config` write `PermitRootLogin without-password`)
* Install ansible dependencies: `lasXXX$ sudo dnf install sudo ansible git python3-dnf python3-netaddr python3-libselinux`
* Check the `hosts` file for entries of `lasXXX.las.kit.edu`
* Edit a file ``host_vars/lasXXX.las.kit.edu``
* Run `ansible-playbook -K --vault-id @prompt sites.yml` probably with the option `-l lasXXX.las.kit.edu`
* Go to our ansible repository, open `hosts`, to edit the `hosts` file for entries of `lasXXX.las.kit.edu`
* Go to our ansible repository, open `host_vars`, to create a file ``lasXXX.las.kit.edu`` with similar contents as others
* Open a new terminal, Go to obelix, become root, by `ssh nie@obelix.las.kit.edu` and `sudo -s`
* Go to ansible, by `cd /root/ansible`
* Synchronise our ansible git repository to obelix, by `git pull`
* Run `ansible-playbook --vault-id @prompt sites.yml --limit lasXXX.las.kit.edu`
## Edit encrypted files
* You can either use `ansible-vault edit --vault-id @prompt group_vars/all/vault.yml` to edit the file in your editor mentioned in the `$EDITOR` environment variable or
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment