Skip to content

Commit 8081cbd

Browse files
Fix ansible loop_var warning, added Rocky9 to CI.
1 parent 1d8f63e commit 8081cbd

6 files changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
- ubuntu2204
4848
- debian12
4949
- debian11
50+
- rockylinux9
5051

5152
steps:
5253
- name: Check out the codebase

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Each cloudflared service instance runs on its own port and configuration, allowi
3232

3333
- Debian 11 (Bullseye), 12 (Bookworm)
3434
- Ubuntu 22.04 (Jammy), 24.04 (Noble)
35+
- Rocky 9 (Blue Onyx)
3536

3637
> ⚠️ The OS compatibility check (`hsecd_os_check`) ensures supported platforms for this role - not official Cloudflare support. Installation on ARM devices is **not officially tested**.
3738

handlers/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
- name: restart cloudflared
33
ansible.builtin.systemd:
4-
name: 'cloudflared{{ item }}.service'
4+
name: 'cloudflared{{ __hsecd_srv_handler }}.service'
55
state: 'restarted'
66
enabled: true
77
daemon_reload: true
88
loop: "{{ range(1, hsecd_cloudflared_services | length + 1) | list }}"
9+
loop_control:
10+
loop_var: "__hsecd_srv_handler"
911
throttle: 1

meta/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ galaxy_info:
1919
versions:
2020
- noble
2121
- jammy
22+
- name: Rocky
23+
versions:
24+
- all
2225

2326
galaxy_tags:
2427
- cloudflared

tasks/cloudflared-config.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
group: 'cloudflared'
99
loop: '{{ hsecd_cloudflared_services }}'
1010
loop_control:
11-
index_var: __hsecd_srv_index
11+
index_var: "__hsecd_srv_index"
12+
loop_var: "__hsecd_srv_item"
1213
vars:
1314
service: '{{ item }}'
1415
port_base: '{{ hsecd_cloudflared_port_base }}'
@@ -24,5 +25,6 @@
2425
group: 'root'
2526
loop: '{{ hsecd_cloudflared_services }}'
2627
loop_control:
27-
index_var: __hsecd_srv_index
28+
index_var: "__hsecd_srv_index"
29+
loop_var: "__hsecd_srv_item"
2830
notify: restart cloudflared

templates/cloudflared.default.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# {{ ansible_managed }}
2-
CLOUDFLARED_OPTS=--port {{ service.port if not auto_port else (port_base + __hsecd_srv_index) }}{% for upstream in service.upstreams %} --upstream {{ upstream }}{% endfor %}{% if service.options %} {{ service.options }}{% endif %}
2+
CLOUDFLARED_OPTS=--port {{ __hsecd_srv_item.port if not auto_port else (port_base + __hsecd_srv_index) }}{% for upstream in __hsecd_srv_item.upstreams %} --upstream {{ upstream }}{% endfor %}{% if __hsecd_srv_item.options %} {{ __hsecd_srv_item.options }}{% endif %}

0 commit comments

Comments
 (0)