Closed elcomtik closed 2 years ago
Actually, it can replace the following task also. https://github.com/scylladb/scylla-ansible-roles/blob/da4a7ae1b3bfce4408211271582227d25500429c/ansible-scylla-node/tasks/manager_agents.yml#L28-L39
All of this can be replaced by this code
- name: Get token from file or generate a new token and store on controller
set_fact:
auth_token: "{{ lookup('password', 'scyllamgr_auth_token.txt chars=ascii_lowercase,ascii_uppercase,digits length=128') }}"
run_once: true
You should use the password plugin to generate a password instead of executing the shell command and copying it to localhost. It can be handled in one task instead of the current two.
https://github.com/scylladb/scylla-ansible-roles/blob/da4a7ae1b3bfce4408211271582227d25500429c/ansible-scylla-node/tasks/manager_agents.yml#L10-L26