diff options
| -rw-r--r-- | group_vars/all.yml | bin | 80 -> 203 bytes | |||
| -rw-r--r-- | group_vars/all.yml.example | 6 | ||||
| -rw-r--r-- | group_vars/homelab.yml | bin | 4326 -> 4205 bytes | |||
| -rw-r--r-- | group_vars/homelab.yml.example | 4 | ||||
| -rw-r--r-- | roles/cgit/meta/main.yml | 3 | ||||
| -rw-r--r-- | roles/cgit/tasks/main.yml | 18 | ||||
| -rw-r--r-- | roles/git/meta/main.yml | 3 |
7 files changed, 29 insertions, 5 deletions
diff --git a/group_vars/all.yml b/group_vars/all.yml Binary files differindex 65817773..e505a7da 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml diff --git a/group_vars/all.yml.example b/group_vars/all.yml.example index 9d69dea6..05ae6f47 100644 --- a/group_vars/all.yml.example +++ b/group_vars/all.yml.example @@ -1,3 +1,9 @@ --- network_ipv6_disabled: true network_prefer_ipv4: true + +user_public_keys: + - "ssh-ed25519 AAAA...fMo" + - "ssh-rsa AAAA...4I3" + +ssh_port: 2222 diff --git a/group_vars/homelab.yml b/group_vars/homelab.yml Binary files differindex cba875ac..0ea6f65e 100644 --- a/group_vars/homelab.yml +++ b/group_vars/homelab.yml diff --git a/group_vars/homelab.yml.example b/group_vars/homelab.yml.example index e240f347..17709d03 100644 --- a/group_vars/homelab.yml.example +++ b/group_vars/homelab.yml.example @@ -1,11 +1,7 @@ --- username: "test_user" -user_public_keys: - - "ssh-ed25519 AAAA...fMo" - - "ssh-rsa AAAA...4I3" network_wifi_ssid: "TEST_WIFI_SSID" network_wifi_pass: "TEST_WIFI_PASS" -ssh_port: 39901 gpg_public_keys: # gpg --export --armor keyID - | diff --git a/roles/cgit/meta/main.yml b/roles/cgit/meta/main.yml index 3b5e8d42..17f33638 100644 --- a/roles/cgit/meta/main.yml +++ b/roles/cgit/meta/main.yml @@ -1,5 +1,6 @@ --- -dependencies: [] +dependencies: + - role: "git" galaxy_info: author: "a14m" description: "Install and configure cgit git web viewer" diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml index c5eeea3b..a2436b50 100644 --- a/roles/cgit/tasks/main.yml +++ b/roles/cgit/tasks/main.yml @@ -23,6 +23,24 @@ home: "{{ cgit_repos_dir }}" create_home: true system: true + password: "*" + +- name: "Create git user .ssh directory" + become: true + ansible.builtin.file: + path: "{{ cgit_repos_dir }}/.ssh" + state: directory + owner: "{{ cgit_ssh_user }}" + group: "{{ cgit_ssh_user }}" + mode: "0700" + +- name: "Deploy authorized_keys" + become: true + ansible.builtin.authorized_key: + user: "{{ cgit_ssh_user }}" + key: "{{ item }}" + state: present + loop: "{{ user_public_keys }}" - name: "Create repos directory" become: true diff --git a/roles/git/meta/main.yml b/roles/git/meta/main.yml index 52262cd1..b47153fd 100644 --- a/roles/git/meta/main.yml +++ b/roles/git/meta/main.yml @@ -16,3 +16,6 @@ galaxy_info: - name: "Debian" versions: - "bookworm" + - name: "Alpine" + versions: + - "all" |
