I got following task to create remote user but I do not have ssh keys setup
on root or any user. what can i do to create the user? I dont have the
become password
# tasks file for createuser
- include_vars:
dir: vars
- name: create user rke
ansible.builtin.user:
name: '{{ username }}'
shell: '{{ shell }}'
generate_ssh_key: yes
create_home: yes
groups: '{{ groupname }}'
append: yes
ssh_key_file: .ssh/id_rsa
become: true
- name: create public key
ansible.builtin.shell:
cmd: "{{ command }}"
register: shell_output
become: true
- name: Change authorized keys permissions
ansible.builtin.file:
path: "{{ authorized_key_path }}"
owner: "{{ username }}"
group: "{{ username }}"
mode: '600'
become: true
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/0c06618b-3a1f-4a37-b2b4-96ffcf1e4467n%40googlegroups.com.