diff --git a/playbooks/lxc_setup_ubuntu.yml b/playbooks/lxc_setup_ubuntu.yml index 379fc7c..5725cfa 100644 --- a/playbooks/lxc_setup_ubuntu.yml +++ b/playbooks/lxc_setup_ubuntu.yml @@ -1,7 +1,7 @@ --- - name: Secure and Configure a New LXC Container hosts: 'lxc' # Hosts or group defined in your inventory - become: yes # Run all tasks as root (sudo) + remote_user: root tasks: - name: 1. Create user '{{ target_user }}' ansible.builtin.user: diff --git a/vars.yml b/vars.yml index 03955ce..4021296 100644 --- a/vars.yml +++ b/vars.yml @@ -1,9 +1,6 @@ # User which will be created on the LXC containers to replace root target_user: 'mbuz' -# User which Ansible will use to connect to the LXC containers initially -ansible_user: 'root' - # List of public keys to be added to the target_user's authorized_keys file my_public_keys: - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINSGj0dxaA38QSBVY3DZiPb+qmIuTFxGo0mt4sbmYDa3 mbuz@macbook-pro"