Created
January 23, 2016 18:04
-
-
Save duntonr/b0f02efcb9c780ca73a7 to your computer and use it in GitHub Desktop.
Ansible example of loading a template as a script and running it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
gitlab-ci-multi-runner register <<EOF | |
https://{{ ci_host_name }}/ci | |
{{ ci_coordinator_token }} | |
{{ ansible_fqdn }} | |
{{ ci_tags }} | |
{{ ci_executor }} | |
{{ ci_executor_var }} | |
latest | |
latest | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###example of loading variables into a script and running it. Note this example is to help build a runner for GitLab | |
- name: load config script | |
template: src=glcirunner_register_docker.sh.j2 dest=/root/glcirunner_register_docker.sh mode="u+rwx" | |
- name: run register script | |
command: sh /root/glcirunner_register_docker.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment