2021-08-31 02:31:23 +00:00
|
|
|
# skylab-ansible
|
|
|
|
|
|
|
|
Ansible configs for the Skylab Homelab
|
|
|
|
|
2021-12-24 04:27:00 +00:00
|
|
|
## Local workstation setup:
|
2021-11-06 03:09:19 +00:00
|
|
|
|
2021-12-24 04:27:00 +00:00
|
|
|
```bash
|
|
|
|
make dev
|
2021-12-28 05:27:46 +00:00
|
|
|
poetry run ansible-playbook ...
|
2021-12-24 04:27:00 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Boostraping remote system for management:
|
2021-11-06 03:09:19 +00:00
|
|
|
|
2022-05-20 21:06:21 +00:00
|
|
|
1. Install a supported operating system: [Rocky Linux](https://rockylinux.org),
|
|
|
|
[Fedora](https://getfedora.org)
|
2021-11-06 03:09:19 +00:00
|
|
|
2. During installation create a user named `ansible` with any password
|
|
|
|
3. After installation copy SSH key to the `ansible` user
|
|
|
|
4. Enable password-less sudo access for the `ansible` user with this command:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo tee /etc/sudoers.d/30-ansible <<<"ansible ALL=(ALL) NOPASSWD:ALL"
|
|
|
|
```
|
|
|
|
|
2021-11-07 00:46:32 +00:00
|
|
|
5. Change the UID/GID of the `ansible` user/group to `1400` with these commands:
|
2021-11-06 03:09:19 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo usermod -u 1400 ansible
|
2021-11-07 00:46:32 +00:00
|
|
|
sudo groupmod -g 1400 ansible
|
2021-11-06 03:09:19 +00:00
|
|
|
```
|