2020-08-18 11:57:53 +02:00
---
2023-10-25 22:26:17 +02:00
- hosts : all
gather_facts : false
roles :
2024-04-04 09:48:09 +02:00
- role : ansible-role-bootstrap
2023-10-26 10:50:36 +02:00
tags : "bootstrap"
become : true
- role : mgrote_apt_manage_sources
tags : "apt_sources"
- role : mgrote_qemu_guest_agent
- role : mgrote_apt_update_packages
tags : "updates"
- role : mgrote_users
tags : "user"
become : true
2023-11-24 14:11:59 +01:00
- role : mgrote_netplan
tags : "netplan"
2023-10-26 00:14:16 +02:00
2023-10-25 22:26:17 +02:00
post_tasks :
- name : Change user password
become : true
ansible.builtin.user :
name : mg
update_password : always
password : "{{ lookup('keepass', 'mg_linux_password_hash', 'password') }}"
2021-06-07 08:40:01 +02:00
2023-10-25 22:26:17 +02:00
vars :
### reobertdebock.bootstrap
bootstrap_user : mg
bootstrap_wait_for_host : false
bootstrap_timeout : 1
### ansible
ansible_user : "mg"
ansible_password : hallowelt
ansible_become_password : hallowelt
ansible_ssh_common_args : "'-o StrictHostKeyChecking=no'"
2023-11-29 21:15:50 +01:00
### mgrote_user
2023-10-26 10:50:36 +02:00
users :
- username : ansible-user
password : "{{ lookup('keepass', 'ansible_user_linux_password_hash', 'password') }}"
update_password : always
groups : ssh, sudo
state : present
public_ssh_key : ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJcBwOjanQV6sFWaTetqpl20SVe3aRzGjKbsp7hKkDCE mg@irantu
allow_sudo : true
allow_passwordless_sudo : true
2020-12-22 14:17:36 +01:00
2021-02-05 10:51:39 +01:00
# Nach dem ersten durchlaufen ist keine Anmeldung mehr per Passwort & ssh möglich. Damit scheitert auch der Versuch das Playbook ein zweites mal durchlaufen zu lassen.