1 snippets random
Luca Matteo Spoljarevic edited this page 2026-02-27 21:40:24 +01:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

snippets/random (Arch Linux post-install)

Location: installation/Arch Linux/post-install/snippets/random/

Miscellaneous playbooks: SSH key generation and git clone of Codeberg repos into fixed directory layout.


sshkeys.yml

  • Installs python-cryptography and python-bcrypt (for the crypto module).
  • Generates an ed25519 SSH keypair at /home/{{ user }}/.ssh/codeberg with a passphrase.

Variable: ssh_key_passphrase should be provided via Ansible Vault (e.g. group_vars/arch/vault.yml) so it isnt in plain text. The playbook uses user: arch by default; change if your login user differs.

Run:

ansible-playbook -i inventory.ini -b -K --ask-vault-pass "installation/Arch Linux/post-install/snippets/random/sshkeys.yml"

gitclone.yml

  • Defines several lists of Codeberg repo URLs (SSH) and groups them by base directory (~/git/ls, ~/git/w2i, ~/git/w2i/od).
  • Ensures each base directory exists.
  • Clones each repo into a folder derived from the URL (e.g. Ansible.gitAnsible).

Note: The post-install README states that git clone can fail due to permission issues when cloning via SSH (even for public repos); may need debugging on your side.

Customisation: Edit codeberg_repos_* and repo_groups in the playbook to match your repos and paths.

Run:

ansible-playbook -i inventory.ini "installation/Arch Linux/post-install/snippets/random/gitclone.yml" -K

Ensure the target user has SSH keys and access to the listed Codeberg repos.