[Add runner wake up ]
This commit is contained in:
@@ -1,8 +1,45 @@
|
|||||||
#! wake up runner !
|
#! wake up runner !
|
||||||
- hosts: tower
|
- hosts: tower
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
vars:
|
||||||
|
token_register_runner: !vault |
|
||||||
|
$ANSIBLE_VAULT;1.2;AES256;prod
|
||||||
|
38313233316133303530346633376266386137363665636264613635356365636435646164643563
|
||||||
|
3765646235333862363161376464613931323262653730660a623933373633346132353335613265
|
||||||
|
31623238393064663137643062323165616564643037373632313932346437383365343661313964
|
||||||
|
3530653265353863320a316331333363376436303562363933663834323333633065303534653039
|
||||||
|
65363661373934383638323530656531353138623732616432333031396561373037616661386335
|
||||||
|
6466613030333533363536393537666232383735373065653030
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
|
- community.docker.docker_compose_v2:
|
||||||
|
project_src: /opt/dockerapps
|
||||||
|
services:
|
||||||
|
- runner
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- community.docker.docker_container_exec:
|
||||||
|
container: runner
|
||||||
|
command: "act_runner register --instance https://gitea.jingoh.fr --labels ubuntu-latest --no-interactive --ephemeral --name runner --token {{ token_register_runner }}"
|
||||||
|
chdir: /data
|
||||||
|
# when: register_runner.failed == true
|
||||||
|
|
||||||
|
# - ansible.builtin.pause:
|
||||||
|
# seconds: 30
|
||||||
|
|
||||||
- community.docker.docker_container_exec:
|
- community.docker.docker_container_exec:
|
||||||
container: runner
|
container: runner
|
||||||
command: act_runner daemon --config .runner
|
command: act_runner daemon --config .runner
|
||||||
chdir: /data
|
chdir: /data
|
||||||
|
# detach: true
|
||||||
|
ignore_errors: true
|
||||||
|
# vars:
|
||||||
|
# ansible_command_timeout: 60
|
||||||
|
register: register_runner
|
||||||
|
async: 60 # timeout après 5 minutes
|
||||||
|
poll: 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ansible.builtin.debug:
|
||||||
|
var: register_runner
|
||||||
|
|||||||
Reference in New Issue
Block a user