algo
algo copied to clipboard
update-users fails because it checks for the external IP, not the hostname
After installing algo following the directions and saving the PKI files, running update-users
will fail because update users looks for the name of the server (vpn.example.com) while the config is saved under the external IP address.
Steps to reproduce the behavior:
- Install Algo. Use the external IP address of the server (as is documented) as the
endpoint
value, and the DNS hostname as the value forserver
. Completes successfully. - Run
./algo update-users
Ansible will fail with:
TASK [Import host specific variables] *****************************************************************************************************************
fatal: [localhost]: FAILED! => {"ansible_facts": {}, "ansible_included_var_files": [], "changed": false, "message": "Could not find or access 'configs/vpn.example.com/.config.yml'\nSearched in:\n\t/path/to/algo/vars/configs/vpn.rism.digital/.config.yml\n\t/path/to/algo/configs/vpn.example.com/.config.yml\n\t/path/to/algo/vars/configs/vpn.example.com/.config.yml\n\t/path/to/algo/configs/vpn.example.com/.config.yml on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}
included: /path/to/algo/playbooks/rescue.yml for localhost
Looking in the configs
directory, it shows that the configs are there, but the directory name is the IP address provided in endpoint
, not the hostname provided in server
.
A workaround is to provide the hostname as the value for endpoint
as well, but this seems to go against what is documented.
@ahankinson Can you provide more specific steps how to reproduce the problem please? Is that cloud or local deployment? What do you select when Algo prompts you in the update-users playbook? I couldn't reproduce it in anyway.