https://rancher.com/ logo
Title
b

brash-monitor-41966

07/25/2022, 6:54 PM
when using rke user
b

bulky-sunset-52084

07/25/2022, 8:29 PM
could you share the error you are getting from your playbook in this thread for a little more context? the user logging in on the nodes needs to be part of the docker users. So I assume when you do
rke up
it must be a different user/key used to authenticate.
b

brash-monitor-41966

07/25/2022, 9:04 PM
- name: Run RKE installer become: yes shell: rke up args: chdir: "{{ rke_config_dir }}" delegate_to: localhost become_user: "{{ username }}" register: result
{{ username }} is rke
output error:
the ssh keys all work using user rke to lgin to remote hosts
issue is executing the ansible task using the ansible user
rke up works fine too using rk user
rke
b

bulky-sunset-52084

07/25/2022, 9:12 PM
you're testing rke up and your ansible rke up are conflicting with each other it seems:
[k8node01]: Error response from daemon: Conflict. The container name \\\"/rke-etcd-port-listener\\\" is already in use by container
I would clean up the node - try it with ansible only - then report back if you get any errors. The errors you posted above just say you're trying to install rke on a node that already has rke running.
b

brash-monitor-41966

07/26/2022, 12:09 AM
ok I clean up the nodes and ran a single play and works
--- - hosts: localhost name: test tasks: - name: run rke installer shell: 'rke up' args: chdir: "/home/rke" become: yes become_user: "rke" delegate_to: localhost register: result - debug: msg: "{{ result }} "
but putting this play as part of a task in the pb is not working