forked from MonolithProjects/ansible-github_actions_runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassert.yml
41 lines (37 loc) · 1.27 KB
/
assert.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
- name: Check github_account variable (RUN ONCE)
ansible.builtin.assert:
that:
- github_account is defined
fail_msg: "github_account is not defined"
run_once: true
when: github_enterprise is not defined
- name: Check access_token variable (RUN ONCE)
ansible.builtin.assert:
that:
- access_token is defined
- access_token | length > 0
fail_msg: "access_token was not found or is using an invalid format."
run_once: true
- name: Check runner_org variable (RUN ONCE)
ansible.builtin.assert:
that:
- runner_org | bool == True or runner_org == False
fail_msg: "runner_org should be a boolean value"
run_once: true
when: github_enterprise is not defined
- name: Check github_repo variable (RUN ONCE)
ansible.builtin.assert:
that:
- github_repo is defined
- github_repo | length > 0
fail_msg: "github_repo was not found or is using an invalid format."
run_once: true
when: not runner_org and github_enterprise is not defined
- name: Check runner_user_win_password (RUN ONCE)
ansible.builtin.assert:
that:
- runner_user_win_password is defined
fail_msg: "runner_user_win_password was not defined, but it is required on a windows system"
run_once: true
when: github_actions_system == "win"