radiasoft / ansible-conf

Radiasoft playbooks
Apache License 2.0
0 stars 1 forks source link

unable to run sudo to create ssh keys #60

Closed robnagler closed 7 years ago

robnagler commented 7 years ago
TASK [mpi_cluster/coordinator/pre : create jupyter dirs] ***********************
changed: [cdg1.radiasoft.org] => (item=/var/lib/jupyter/conf)
changed: [cdg1.radiasoft.org] => (item=/var/lib/jupyter/mpi_bin)

TASK [mpi_cluster/coordinator/pre : create coordinator user ssh key] ***********
fatal: [cdg1.radiasoft.org]: FAILED! => {"changed": false, "failed": true, "module_stderr": "sudo: sorry, you must have a tty to run sudo\n", "module_stdout": "", "msg": "MODULE FAILURE"}
elventear commented 7 years ago

I think using become_method might fix the issue.

- name: create coordinator user ssh key
  [...]
  become: yes
  become_user: vagrant
  become_method: su