ansible_cache/kubernetes/roles/common/tasks/main.yml

17 lines
460 B
YAML
Raw Normal View History

2023-03-15 12:13:51 +00:00
---
- 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
2023-03-15 12:17:07 +00:00
key: "{{ local_key }}"