I have an ansible playbook, wich connects to a remote server.
On that remote server sudo is not installed. I can only gather root access with running dzdo su - in terminal.
I tried to run following task to install sudo
`
- name: Install sudo
yum:
name: sudo
become: yes
become_user: root
`
But when I run the code I get following error:
TASK [docker-yum : Install sudo] *******************************************************************************************************************************************************************************************************************************
fatal: [10.7.201.186]: FAILED! => {“changed”: false, “changes”: {“installed”: [“sudo”]}, “msg”: “Repo rhui-rhel-7-server-dotnet-rhui-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-dotnet-rhui-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-dotnet-rhui-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-dotnet-rhui-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-dotnet-rhui-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-dotnet-rhui-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-extras-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-extras-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-extras-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-extras-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-extras-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-extras-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-optional-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-optional-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-optional-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-optional-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-optional-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-optional-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-rh-common-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-rh-common-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-rh-common-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-rh-common-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-rh-common-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-rh-common-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-supplementary-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-supplementary-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-supplementary-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-supplementary-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-7-server-rhui-supplementary-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-7-server-rhui-supplementary-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-server-rhui-rhscl-7-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-server-rhui-rhscl-7-debug-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-server-rhui-rhscl-7-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-server-rhui-rhscl-7-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nRepo rhui-rhel-server-rhui-rhscl-7-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content.crt\nRepo rhui-rhel-server-rhui-rhscl-7-source-rpms forced skip_if_unavailable=True due to: /etc/pki/rhui/key.pem\nYou need to be root to perform this command.\n”, “rc”: 1, “results”: [“Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-\n : manager\n”]}