Skip to content

Commit 0619755

Browse files
authored
fix tests (#5)
* add file modes * extend ci * ci: add schedule
1 parent 83fa3af commit 0619755

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ name: CI
77
- main
88
tags:
99
- "v*"
10+
schedule:
11+
- cron: 57 7 * * 2 # Run weekly
1012

1113
defaults:
1214
run:
@@ -44,16 +46,22 @@ jobs:
4446
strategy:
4547
matrix:
4648
include:
49+
- distro: debian12
50+
playbook: converge.yml
4751
- distro: debian11
4852
playbook: converge.yml
49-
- distro: rockylinux8
53+
- distro: debian10
5054
playbook: converge.yml
51-
- distro: ubuntu2004
55+
- distro: rockylinux9
5256
playbook: converge.yml
53-
- distro: debian10
57+
- distro: rockylinux8
5458
playbook: converge.yml
5559
- distro: centos7
5660
playbook: converge.yml
61+
- distro: ubuntu2204
62+
playbook: converge.yml
63+
- distro: ubuntu2004
64+
playbook: converge.yml
5765
steps:
5866
- name: Check out the codebase.
5967
uses: actions/checkout@v4
@@ -66,7 +74,7 @@ jobs:
6674
python-version: "3.x"
6775

6876
- name: Install test dependencies.
69-
run: pip3 install ansible molecule[docker] docker
77+
run: pip3 install ansible molecule molecule-docker docker
7078

7179
- name: Run Molecule tests.
7280
run: molecule test

molecule/default/molecule.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ driver:
55
name: docker
66
platforms:
77
- name: instance
8-
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
8+
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian12}-ansible:latest"
99
command: ${MOLECULE_DOCKER_COMMAND:-""}
1010
volumes:
11-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
11+
- /sys/fs/cgroup:/sys/fs/cgroup:rw
12+
cgroupns_mode: host
1213
privileged: true
1314
pre_build_image: true
1415
provisioner:

tasks/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,27 @@
1717
run_once: false
1818
ansible.builtin.template:
1919
src: ssh_config.j2
20+
mode: "0640"
2021
dest: "{{ ssh_config__fragments_path }}/{{ inventory_hostname }}"
2122
changed_when: false
2223

2324
- name: Create destination directory
2425
ansible.builtin.file:
2526
path: "{{ ssh_config__dest_path }}"
27+
mode: "0755"
2628
state: directory
2729

2830
- name: Add header file
2931
ansible.builtin.copy:
3032
content: "### Autogenerated, do not modify ###\n"
33+
mode: "0644"
3134
dest: "{{ ssh_config__fragments_path }}/00-header"
3235
changed_when: false
3336

3437
- name: Assemble config fragments into a single SSH config
3538
ansible.builtin.assemble:
3639
src: "{{ ssh_config__fragments_path }}"
40+
mode: "0600"
3741
dest: "{{ ssh_config__dest_path }}/ssh_config_{{ ssh_config__env }}.conf"
3842
delimiter: "\n"
3943

0 commit comments

Comments
 (0)