Added base for k8s playbook repo

This commit is contained in:
Vlad R
2023-03-15 12:17:07 +00:00
parent 6f7d1f9bd3
commit 2a3edc6a62
6 changed files with 82 additions and 28 deletions
+16
View File
@@ -0,0 +1,16 @@
---
- name: Create a user with sudo privileges which will be used for managing the host via SSH
ansible.builtin.user:
name: "{{ local_user }}"
state: present
groups: sudo
append: true
create_home: true
shell: /bin/bash
password: "{{ local_password }}"
- name: Set authorized key for remote SSH access (passwordless login)
ansible.posix.authorized_key:
user: "{{ local_user }}"
state: present
key: "{{ local_key }}"