Describe the bug
If Omnia is given a host name with a hyphen ansible-playbook prepare_oim task fails.
To Reproduce
Steps to reproduce the behavior:
- During configuration or by editing:
/opt/omnia/.data/oim_metadata.yml...
- ... set a hostname with a hypen in it.
- run
ansible-playbook ./prepare_oim.yml
- See error:
TASK [deploy_containers/openchami : Check ochami bss status] ******************************************************************
skipping: [oim]
TASK [deploy_containers/openchami : Display bss status] ***********************************************************************
skipping: [oim]
TASK [deploy_containers/openchami : Verify ochami dependencies] ***************************************************************
fatal: [oim]: FAILED! => {"changed": false, "module_stderr": "Shared connection to localhost closed.\r\n", "module_stdout": "bash: TEST-OIM_ACCESS_TOKEN=aabbccddeeff....
Expected behavior
No error.
Additional context
Occasionally Omnia builds environment variables using the ansible variable oim_node_name. oim_node_name is in-turn set to $(hostname). If hostname has a hyphen, an environment variable is created and named that includes a hyphen. Hyphens are not supported in environment variables in most common shells:
https://github.com/dell/omnia/blob/main/common/vars/openchami_vars.yml#L16
Describe the bug
If Omnia is given a host name with a hyphen
ansible-playbook prepare_oimtask fails.To Reproduce
Steps to reproduce the behavior:
/opt/omnia/.data/oim_metadata.yml...ansible-playbook ./prepare_oim.ymlExpected behavior
No error.
Additional context
Occasionally Omnia builds environment variables using the ansible variable
oim_node_name. oim_node_name is in-turn set to$(hostname). If hostname has a hyphen, an environment variable is created and named that includes a hyphen. Hyphens are not supported in environment variables in most common shells:https://github.com/dell/omnia/blob/main/common/vars/openchami_vars.yml#L16