Find the first letter of the role, not the first letter of "ansible".

This commit is contained in:
Robert de Bock 2021-04-02 08:35:10 +02:00
parent 01d3761342
commit bd78efb905
3 changed files with 41 additions and 37 deletions

View File

@ -55,6 +55,10 @@
protects: true protects: true
masked: true masked: true
- name: show details
debug:
msg: "Scheduling {{ role }} on {{ letter_minute_mapping[role[13]] }} {{ letter_hour_mapping[role[13]] }} {{ letter_day_mapping[role[13]] }} * *"
- name: create a new pipeline schedule - name: create a new pipeline schedule
uri: uri:
url: "https://gitlab.com/api/v4/projects/{{ encoded_path }}/pipeline_schedules" url: "https://gitlab.com/api/v4/projects/{{ encoded_path }}/pipeline_schedules"
@ -67,5 +71,5 @@
body: body:
description: "Monthly test" description: "Monthly test"
ref: master ref: master
cron: '{{ letter_minute_mapping[role[0]] }} {{ letter_hour_mapping[role[0]] }} {{ letter_day_mapping[role[0]] }} * *' cron: '{{ letter_minute_mapping[role[13]] }} {{ letter_hour_mapping[role[13]] }} {{ letter_day_mapping[role[13]] }} * *'
cron_timezone: Amsterdam cron_timezone: Amsterdam

View File

@ -40,7 +40,7 @@ The following roles are used to prepare a system. You may choose to prepare your
| Requirement | GitHub | GitLab | | Requirement | GitHub | GitLab |
|-------------|--------|--------| |-------------|--------|--------|
{% for requirement in requirements.roles %} {% for requirement in requirements.roles %}
| [{{ requirement.name }}](https://galaxy.ansible.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.') }}) | [![Build Status GitHub](https://github.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.', 'ansible-role-') }}/workflows/Ansible%20Molecule/badge.svg)](https://github.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.', 'ansible-role-') }}/actions) | [![Build Status GitLab ](https://gitlab.com/{{ github_namespace }}/ansible-role-{{ requirement.name | regex_replace(github_namespace + '\.', 'ansible-role-') }}/badges/master/pipeline.svg)](https://gitlab.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.', 'ansible-role-') }}) |[{{ requirement.name }}](https://galaxy.ansible.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.') }})|[![Build Status GitHub](https://github.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.', 'ansible-role-') }}/workflows/Ansible%20Molecule/badge.svg)](https://github.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.', 'ansible-role-') }}/actions)|[![Build Status GitLab ](https://gitlab.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.', 'ansible-role-') }}/badges/master/pipeline.svg)](https://gitlab.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.', 'ansible-role-') }})|
{% endfor %} {% endfor %}
{% endif %} {% endif %}

View File

@ -166,38 +166,38 @@ letter_hour_mapping:
letter_minute_mapping: letter_minute_mapping:
a: 1 a: 1
b: 2 b: 3
c: 3 c: 5
d: 4 d: 7
e: 5 e: 9
f: 6 f: 11
g: 7 g: 13
h: 8 h: 15
i: 9 i: 17
j: 10 j: 19
k: 11 k: 21
l: 12 l: 23
m: 13 m: 25
n: 14 n: 27
o: 15 o: 29
p: 16 p: 31
q: 17 q: 33
r: 18 r: 35
s: 19 s: 37
t: 20 t: 39
u: 21 u: 41
v: 23 v: 43
w: 24 w: 45
x: 25 x: 47
y: 26 y: 49
z: 27 z: 51
0: 28 0: 53
1: 29 1: 55
2: 30 2: 57
3: 31 3: 59
4: 32 4: 59
5: 33 5: 59
6: 34 6: 59
7: 35 7: 59
8: 36 8: 59
9: 37 9: 59