add when on redeploy task ...
This commit is contained in:
12
README.md
12
README.md
@@ -32,4 +32,14 @@ RUNNER_INSTANCE: https://your_gitea.com/
|
|||||||
```
|
```
|
||||||
Hint: A token can register multible runners, in some cases it can make sense var RUNNER_TOKEN and RUNNER_LABELS define in a group.
|
Hint: A token can register multible runners, in some cases it can make sense var RUNNER_TOKEN and RUNNER_LABELS define in a group.
|
||||||
|
|
||||||
For all vars look at [defaults](defaults/main.yml)!
|
For all vars look at [defaults](defaults/main.yml)!
|
||||||
|
|
||||||
|
## features
|
||||||
|
### redeploy a runner
|
||||||
|
Somtimes it is need to redeploy a runner (with other token e.g.). in this case you can simply use this:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
RUNNER_REDEPLOY: true
|
||||||
|
```
|
||||||
|
Hint: should remove after usage!
|
||||||
|
With this option ansible delete the `.runner` file. Without this file ansible do a new registration for this runner.
|
||||||
@@ -52,10 +52,11 @@
|
|||||||
- name: flush handlers
|
- name: flush handlers
|
||||||
meta: flush_handlers
|
meta: flush_handlers
|
||||||
|
|
||||||
- name: dele .runner file for redeploy
|
- name: delete .runner file for redeploy
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
state: absent
|
state: absent
|
||||||
path: "{{ RUNNER_DIR }}/.runner"
|
path: "{{ RUNNER_DIR }}/.runner"
|
||||||
|
when: RUNNER_REDEPLOY
|
||||||
|
|
||||||
- name: register runner
|
- name: register runner
|
||||||
notify: restart runner
|
notify: restart runner
|
||||||
|
|||||||
Reference in New Issue
Block a user