diff options
author | clarkzjw <[email protected]> | 2023-01-13 15:43:30 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-01-13 15:43:30 -0800 |
commit | 61b24b7f9da768902886747ea70e5b91695edad0 (patch) | |
tree | 62b8ab388bd516077c39d3cf7e0095552ff8c906 | |
parent | 966596fd3f0e9b60aad55a05c5defa33b9f7e03f (diff) | |
download | homelab-61b24b7f9da768902886747ea70e5b91695edad0.tar.gz |
fix init
-rw-r--r-- | clarkzjw.ca/config/atlas/README.md | 2 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/ansible.cfg | 2 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/init.yaml | 3 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/inventory/hosts.yaml | 2 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml | 32 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/roles/tailscale/tasks/main.yaml | 16 |
6 files changed, 37 insertions, 20 deletions
diff --git a/clarkzjw.ca/config/atlas/README.md b/clarkzjw.ca/config/atlas/README.md index 5525ea9..37e39b3 100644 --- a/clarkzjw.ca/config/atlas/README.md +++ b/clarkzjw.ca/config/atlas/README.md | |||
@@ -11,6 +11,8 @@ Usage: HomeLab Main NAS | |||
11 | ansible-playbook init.yaml -K -k | 11 | ansible-playbook init.yaml -K -k |
12 | ``` | 12 | ``` |
13 | 13 | ||
14 | Login and exec `sudo tailscale up` and authorize Tailscale in the admin panel. | ||
15 | |||
14 | ### Setup | 16 | ### Setup |
15 | ```bash | 17 | ```bash |
16 | ansible-playbook setup.yaml | 18 | ansible-playbook setup.yaml |
diff --git a/clarkzjw.ca/config/atlas/ansible.cfg b/clarkzjw.ca/config/atlas/ansible.cfg index 9ad35f3..e0f6c28 100644 --- a/clarkzjw.ca/config/atlas/ansible.cfg +++ b/clarkzjw.ca/config/atlas/ansible.cfg | |||
@@ -1,5 +1,5 @@ | |||
1 | [defaults] | 1 | [defaults] |
2 | host_key_checking = True | 2 | host_key_checking = False |
3 | transport = ssh | 3 | transport = ssh |
4 | remote_user = clarkzjw | 4 | remote_user = clarkzjw |
5 | roles_path = roles | 5 | roles_path = roles |
diff --git a/clarkzjw.ca/config/atlas/init.yaml b/clarkzjw.ca/config/atlas/init.yaml index 9415d6f..3dfbc09 100644 --- a/clarkzjw.ca/config/atlas/init.yaml +++ b/clarkzjw.ca/config/atlas/init.yaml | |||
@@ -1,6 +1,6 @@ | |||
1 | --- | 1 | --- |
2 | - name: Init | 2 | - name: Init |
3 | hosts: storinator | 3 | hosts: atlas |
4 | remote_user: root | 4 | remote_user: root |
5 | gather_facts: true | 5 | gather_facts: true |
6 | vars: | 6 | vars: |
@@ -8,4 +8,3 @@ | |||
8 | 8 | ||
9 | roles: | 9 | roles: |
10 | - role: init | 10 | - role: init |
11 | - role: tailscale | ||
diff --git a/clarkzjw.ca/config/atlas/inventory/hosts.yaml b/clarkzjw.ca/config/atlas/inventory/hosts.yaml index 1291bbb..bee48c4 100644 --- a/clarkzjw.ca/config/atlas/inventory/hosts.yaml +++ b/clarkzjw.ca/config/atlas/inventory/hosts.yaml | |||
@@ -1,3 +1,3 @@ | |||
1 | all: | 1 | all: |
2 | hosts: | 2 | hosts: |
3 | storinator: | 3 | atlas: |
diff --git a/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml b/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml index cc69403..29cf529 100644 --- a/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml +++ b/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml | |||
@@ -22,3 +22,35 @@ | |||
22 | user: clarkzjw | 22 | user: clarkzjw |
23 | state: present | 23 | state: present |
24 | key: https://github.com/clarkzjw.keys | 24 | key: https://github.com/clarkzjw.keys |
25 | |||
26 | - name: Add Tailscale GPG apt Key | ||
27 | apt_key: | ||
28 | url: https://pkgs.tailscale.com/stable/debian/bullseye.noarmor.gpg | ||
29 | keyring: /usr/share/keyrings/tailscale-archive-keyring.gpg | ||
30 | state: present | ||
31 | |||
32 | - name: Add Tailscale Repository | ||
33 | get_url: | ||
34 | url: https://pkgs.tailscale.com/stable/debian/bullseye.tailscale-keyring.list | ||
35 | dest: /etc/apt/sources.list.d/tailscale.list | ||
36 | |||
37 | - name: Install Tailscale | ||
38 | apt: | ||
39 | name: | ||
40 | - tailscale | ||
41 | update_cache: true | ||
42 | |||
43 | - name: Disable Root Login | ||
44 | lineinfile: | ||
45 | dest: /etc/ssh/sshd_config | ||
46 | regexp: '^PermitRootLogin yes' | ||
47 | line: "PermitRootLogin no" | ||
48 | state: present | ||
49 | backup: yes | ||
50 | |||
51 | - name: Restart SSHD | ||
52 | systemd: | ||
53 | name: ssh | ||
54 | enabled: true | ||
55 | state: restarted | ||
56 | daemon_reload: true | ||
diff --git a/clarkzjw.ca/config/atlas/roles/tailscale/tasks/main.yaml b/clarkzjw.ca/config/atlas/roles/tailscale/tasks/main.yaml deleted file mode 100644 index 8ec4a61..0000000 --- a/clarkzjw.ca/config/atlas/roles/tailscale/tasks/main.yaml +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | - name: Add Tailscale GPG apt Key | ||
2 | apt_key: | ||
3 | url: https://pkgs.tailscale.com/stable/debian/bullseye.noarmor.gpg | ||
4 | keyring: /usr/share/keyrings/tailscale-archive-keyring.gpg | ||
5 | state: present | ||
6 | |||
7 | - name: Add Tailscale Repository | ||
8 | get_url: | ||
9 | url: https://pkgs.tailscale.com/stable/debian/bullseye.tailscale-keyring.list | ||
10 | dest: /etc/apt/sources.list.d/tailscale.list | ||
11 | |||
12 | - name: Install Tailscale | ||
13 | apt: | ||
14 | name: | ||
15 | - tailscale | ||
16 | update_cache: true | ||