Docker Installation on Single Node #49
-
When I try and install the component pack (single node) I receive an error in TASK [docker-install : Add {{__kubectl_user}} to the group docker] The task includes an option with an undefined variable. The error was : {{kubectl_user | default (ansible_env['SUDO_USER']) dict object has no attribute 'SUDO_USER' Will be grateful for you advice on what is wrong. Many thanks Michael Lawson |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey Michael, what OS you are running it on, and what version? Normally, (ansible_env['SUDO_USER']) means that whatever user is running Ansible is registered inside the machine in Ansible environment as SUDO_USER. Also, you can add to the bottom of your inventory file this line: kubectl_user="michallawson" ...and in case your user that you are running Ansible with is that one, it will set up everything needed for that user. Can you try that? |
Beta Was this translation helpful? Give feedback.
Hey Michael, what OS you are running it on, and what version?
Normally, (ansible_env['SUDO_USER']) means that whatever user is running Ansible is registered inside the machine in Ansible environment as SUDO_USER.
Also, you can add to the bottom of your inventory file this line:
kubectl_user="michallawson"
...and in case your user that you are running Ansible with is that one, it will set up everything needed for that user. Can you try that?