The commit rephrases the README to focus on Cloud-Init setup and removes unused Ansible code, making Tailscale configuration automatic. Subject line: Replace Ansible with automated Cloud-Init configuration Body: Refactors infrastructure bootstrapping to leverage Cloud-Init instead of Ansible for initial VM setup, particularly with respect to Tailscale installation and authentication. This simplifies the architecture by: - Removing manual post-provisioning Ansible steps - Automating Tailscale setup via Cloud-Init - Updating documentation to reflect new workflow
30 lines
659 B
Plaintext
30 lines
659 B
Plaintext
#cloud-config
|
|
|
|
# 1. Configuration du nom d'hôte de la machine
|
|
hostname: ${hostname}
|
|
fqdn: ${hostname}
|
|
preserve_hostname: false
|
|
|
|
# 2. Création de l'utilisateur
|
|
users:
|
|
- name: ${username}
|
|
sudo: ALL=(ALL) NOPASSWD:ALL
|
|
groups: sudo, admin
|
|
shell: /bin/bash
|
|
ssh_authorized_keys:
|
|
- ${ssh_key}
|
|
|
|
# 3. Mise à jour du système
|
|
package_update: true
|
|
package_upgrade: true
|
|
|
|
# 4. Installation des paquets
|
|
packages:
|
|
- qemu-guest-agent
|
|
- curl
|
|
|
|
# 5. Installation et configuration de Tailscale
|
|
runcmd:
|
|
- [ sh, -c, "curl -fsSL https://tailscale.com/install.sh | sh" ]
|
|
- [ tailscale, up, --authkey=${tailscale_auth_key}, --hostname=${vm_name} ]
|