Compare commits

...

3 Commits

4 changed files with 24 additions and 7 deletions

View File

@ -5,3 +5,20 @@ Ansible configs for the Skylab Homelab
Main entrypoint is through the `ansible` script in this repository. The script sets up Main entrypoint is through the `ansible` script in this repository. The script sets up
basic environment variables to avoid conflicts with other environments and sets the basic environment variables to avoid conflicts with other environments and sets the
inventory. inventory.
Bootstrap checklist:
1. Install a supported operating system: [Rocky Linux](https://rockylinux.org)
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"
```
5. Change the UID of the `ansible` user to `1400` with this command:
```bash
sudo usermod -u 1400 ansible
```

View File

@ -29,22 +29,23 @@ en1:
cluster: cluster:
vars: vars:
skylab_targets: [cluster, datastore]
skylab_roles: skylab_roles:
- server - server
- docker-swarm-manager - docker-swarm-manager
- datastore - datastore
hosts: hosts:
pegasus: # jupiter pegasus: # jupiter
ansible_host: 10.42.101.100 ansible_host: 10.42.101.100
skylab_description: Arbiter Node skylab_description: Arbiter Node
skylab_targets: [cluster, datastore]
skylab_cluster: skylab_cluster:
address: 10.42.101.10/24 address: 10.42.101.10/24
interface: bond0 interface: bond0
saturn: # remus saturn: # remus
ansible_host: 10.42.101.110 ansible_host: 10.42.101.110
skylab_description: Operation Node skylab_description: Operational Node
skylab_cluster: skylab_cluster:
address: 10.42.101.110/24 address: 10.42.101.110/24
interface: bond0 interface: bond0
@ -67,8 +68,7 @@ en1:
orion: # romulus orion: # romulus
ansible_host: 10.42.101.120 ansible_host: 10.42.101.120
skylab_description: Operation Node skylab_description: Operational Node
skylab_targets: [cluster, datastore]
skylab_cluster: skylab_cluster:
address: 10.42.101.12/24 address: 10.42.101.12/24
interface: bond0 interface: bond0

View File

@ -25,7 +25,7 @@
- name: Set hostname - name: Set hostname
become: true become: true
ansible.builtin.hostname: ansible.builtin.hostname:
name: "{{ inventory_hostname }}" name: "{{ skylab_networking.hostname | default(inventory_hostname) }}"
use: systemd use: systemd
- name: Install global bash config - name: Install global bash config

View File

@ -3,13 +3,13 @@ skylab_accounts:
- name: enpaul - name: enpaul
uid: 1300 uid: 1300
fullname: Ethan N. Paul fullname: Ethan N. Paul
targets: [cloud, network] targets: [network, datastore, cluster]
admin: true admin: true
password: $y$j9T$cWkd9aGj4sNepyJm5NVZl0$yBhFy3cN3syM8r4doGYnsLZhsaTLQVoDIBs2kkXtxY2 password: $y$j9T$cWkd9aGj4sNepyJm5NVZl0$yBhFy3cN3syM8r4doGYnsLZhsaTLQVoDIBs2kkXtxY2
- name: ansible - name: ansible
uid: 1400 uid: 1400
targets: [cloud, network] targets: [network, datastore, cluster]
admin: true admin: true
service: true service: true
password: $y$j9T$w/pIBtZIMo3PmXccZ.LHi1$AbMVIks.P10CyuK8tWt21O4JuLpKGpWTFgX0WlTbiw6 password: $y$j9T$w/pIBtZIMo3PmXccZ.LHi1$AbMVIks.P10CyuK8tWt21O4JuLpKGpWTFgX0WlTbiw6