Ansible成为用户无法运行命令

时间:2019-12-05 09:13:09

标签: ansible

我的yml:

---
- hosts: all
  gather_facts: yes
  become: yes
  become_method: sudo
  become_user: or{{sid}}

  tasks:
   - name: Check the id
     shell: whoami
     register: id

错误:

fatal: [exlodbadm04 ]: FAILED! => {"changed": false, "module_stderr": "Shared connection to exlodbadm04 closed.\r\n", "module_stdout": "\r\nSorry, user tkounain is not allowed to execute '/bin/sh -c echo BECOME-SUCCESS-oaagrwuwwvqysbkjdrksyihaplvrowyf; /usr/bin/python /tmp/ansible-tmp-1575536551.48-205039480507144/setup.py' as oranew on ogexlonqdbadm04.og.ge.com.\r\n", "msg": "MODULE FAILURE", "rc": 1}

我正在这样运行它:

ansible-playbook  tk.yml -e "sid=anew" --ask-sudo-pass --ask-pass

0 个答案:

没有答案