Skip to content
Snippets Groups Projects

feat: dynamic create hosts inventory file

Merged Bo-Chun Chen requested to merge louistw/hpc-factory:feat-dynamic-hosts into feat-hpc-factory
1 file
+ 5
1
Compare changes
  • Side-by-side
  • Inline
+ 5
1
@@ -189,7 +189,11 @@ deploy_ssh_proxy_node:
git clone ${CI_REPOSITORY_URL} /tmp/${CI_PROJECT_NAME}
cd /tmp/${CI_PROJECT_NAME}
git checkout ${CI_COMMIT_REF_NAME}
ansible-playbook -c local -i 127.0.0.1, --extra-vars="$EXTRA_VARS" ansible/cluster.yml | tee -a /tmp/ansible.log
cat >> ansible/hosts<<EEOF
[$ENV]
127.0.0.1
EEOF
ansible-playbook -c local -i ansible/hosts --extra-vars="$EXTRA_VARS" ansible/cluster.yml | tee -a /tmp/ansible.log
rm -rf /tmp/${CI_PROJECT_NAME}
EOF
- |
Loading