Olá,
Estou tentando criar um usuário em um cluster que criei no vagrant usando o script abaixo:
- hosts: all
become: yes
tasks:
- name: create the 'ubuntu' user
user: name=ubuntu append=yes state=present createhome=yes shell=/bin/bash
- name: allow 'ubuntu' to have passwordless sudo
lineinfile:
dest: /etc/sudoers
line: 'ubuntu ALL=(ALL) NOPASSWD: ALL'
validate: 'visudo -cf %s'
- name: set up authorized keys for the ubuntu user
authorized_key: user=ubuntu key="{{item}}"
with_file:
- ~/.ssh/id_rsa.pub
Só que recebo o erro abaixo:
TASK [initial : create the ubuntu user] *******************************************************************************************************************************************************
fatal: [172.17.177.50]: FAILED! => {"changed": false, "module_stderr": "sudo: a password is required\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
to retry, use: --limit @/home/jonatas/workspace/ansible_kubernetes/provisioning.retry
alguém sabe como resolver isso?