diff options
author | clarkzjw <[email protected]> | 2023-01-13 13:48:39 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-01-13 13:48:39 -0800 |
commit | 12ebe13899b44122739418e96f0422ef15b28330 (patch) | |
tree | 1487cfa0fd1fb825268def0fddf5fbf58d168ca3 | |
parent | 7f03acd7b74fc96ee8fb10dc5becd758b080455b (diff) | |
download | homelab-12ebe13899b44122739418e96f0422ef15b28330.tar.gz |
ansible: setup
-rw-r--r-- | clarkzjw.ca/config/atlas/init.yaml | 9 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/inventory/hosts.yaml | 4 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml | 21 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/setup.yaml | 8 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/site.yaml | 5 |
5 files changed, 39 insertions, 8 deletions
diff --git a/clarkzjw.ca/config/atlas/init.yaml b/clarkzjw.ca/config/atlas/init.yaml new file mode 100644 index 0000000..d8c8ef9 --- /dev/null +++ b/clarkzjw.ca/config/atlas/init.yaml | |||
@@ -0,0 +1,9 @@ | |||
1 | --- | ||
2 | - name: Init | ||
3 | hosts: storinator | ||
4 | remote_user: clarkzjw | ||
5 | gather_facts: false | ||
6 | |||
7 | roles: | ||
8 | - role: init | ||
9 | - role: tailscale | ||
diff --git a/clarkzjw.ca/config/atlas/inventory/hosts.yaml b/clarkzjw.ca/config/atlas/inventory/hosts.yaml index 98becce..1291bbb 100644 --- a/clarkzjw.ca/config/atlas/inventory/hosts.yaml +++ b/clarkzjw.ca/config/atlas/inventory/hosts.yaml | |||
@@ -1,5 +1,3 @@ | |||
1 | all: | 1 | all: |
2 | hosts: | 2 | hosts: |
3 | atlas: | 3 | storinator: |
4 | vars: | ||
5 | ansible_ssh_common_args: "-J pve" \ No newline at end of file | ||
diff --git a/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml b/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml new file mode 100644 index 0000000..35284bd --- /dev/null +++ b/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml | |||
@@ -0,0 +1,21 @@ | |||
1 | - name: Make sure we have a 'wheel' group | ||
2 | group: | ||
3 | name: wheel | ||
4 | state: present | ||
5 | become_user: root | ||
6 | |||
7 | - name: Allow 'wheel' group to have passwordless sudo | ||
8 | become_user: root | ||
9 | lineinfile: | ||
10 | dest: /etc/sudoers | ||
11 | state: present | ||
12 | regexp: '^%wheel' | ||
13 | line: '%wheel ALL=(ALL) NOPASSWD: ALL' | ||
14 | validate: visudo -cf %s | ||
15 | |||
16 | - name: Add sudoers users to wheel group | ||
17 | become_user: root | ||
18 | user: | ||
19 | name: clarkzjw | ||
20 | groups: wheel | ||
21 | append: yes | ||
diff --git a/clarkzjw.ca/config/atlas/setup.yaml b/clarkzjw.ca/config/atlas/setup.yaml new file mode 100644 index 0000000..34622c8 --- /dev/null +++ b/clarkzjw.ca/config/atlas/setup.yaml | |||
@@ -0,0 +1,8 @@ | |||
1 | - name: Setup Storinator | ||
2 | hosts: storinator | ||
3 | remote_user: clarkzjw | ||
4 | gather_facts: true | ||
5 | |||
6 | roles: | ||
7 | - role: debian_init | ||
8 | - role: samba | ||
diff --git a/clarkzjw.ca/config/atlas/site.yaml b/clarkzjw.ca/config/atlas/site.yaml deleted file mode 100644 index 7ffbe81..0000000 --- a/clarkzjw.ca/config/atlas/site.yaml +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | - hosts: atlas | ||
2 | roles: | ||
3 | - role: tailscale | ||
4 | - role: debian_init | ||
5 | - role: samba | ||