Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ansible Been用户无法运行该命令_Ansible - Fatal编程技术网

Ansible Been用户无法运行该命令

Ansible Been用户无法运行该命令,ansible,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, "mod

我的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}

对不起,不允许用户tkounain执行XXXXXXX
。您是否正确配置了权限升级?=>是的,我已经在ansible.cfg[privilege\u escalation]been\u exe='sudo su-'中添加了它,并像ansible playbook tk.yml一样再次执行它——ask-been-pass——been-been-been-method=su——been-user=oraogpq1,面临现在致命的错误:[exlondbadm04]:失败!=>{“msg”:“等待权限提升提示的超时(12秒):}致命:[exlondbadm05]:失败!=>{“msg”:“等待权限提升提示超时(12s):}您的用户的权限提升是在目标计算机上完成的(例如,将sudo配置为使用或不使用密码完全访问任何命令…),而不是在ansible.cfg中完成的
ansible-playbook  tk.yml -e "sid=anew" --ask-sudo-pass --ask-pass