Skip to content

Instantly share code, notes, and snippets.

@duntonr
Created January 23, 2016 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duntonr/b0f02efcb9c780ca73a7 to your computer and use it in GitHub Desktop.
Save duntonr/b0f02efcb9c780ca73a7 to your computer and use it in GitHub Desktop.
Ansible example of loading a template as a script and running it
#!/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
###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