File tree Expand file tree Collapse file tree 8 files changed +126
-0
lines changed Expand file tree Collapse file tree 8 files changed +126
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ # These Jobs should be always be run against the latest version of ansible on the systems
3
+ # Feel free to update python and ansible versions
4
+ #
5
+ # In addition to keep them quick and no additional variables are used.
6
+ #
7
+ name : role-icingadb
8
+ on :
9
+ push :
10
+ branches :
11
+ - main
12
+ - ' feature/**'
13
+ - ' fix/**'
14
+ - ' !doc/**'
15
+ paths :
16
+ - roles/icingadb/**
17
+ - molecule/role-icingadb/**
18
+ pull_request :
19
+ branches :
20
+ - ' feature/**'
21
+ - ' fix/**'
22
+ - ' !doc/**'
23
+
24
+ jobs :
25
+ icingadb_latest :
26
+ runs-on : ubuntu-latest
27
+
28
+ env :
29
+ COLLECTION_NAMESPACE : icinga
30
+ COLLECTION_NAME : icinga
31
+
32
+ strategy :
33
+ fail-fast : false
34
+ max-parallel : 1
35
+ matrix :
36
+ distro : [ubuntu2204]
37
+ python : ['3.10']
38
+ ansible : ['2.16.2']
39
+ scenario : [role-icingadb]
40
+
41
+ steps :
42
+ - name : Check out code
43
+ uses : actions/checkout@v4
44
+
45
+ - name : Set up Python
46
+ uses : actions/setup-python@v4
47
+ with :
48
+ python-version : ${{ matrix.python }}
49
+
50
+ - name : Install dependencies ansible
51
+ run : |
52
+ python3 -m pip install --upgrade pip
53
+ python3 -m pip install -r requirements-test-${{ matrix.ansible }}.txt
54
+
55
+ - name : Install collection
56
+ run : |
57
+ mkdir -p ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE
58
+ cp -a ../ansible-collection-$COLLECTION_NAME ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
59
+
60
+ - name : Test with molecule
61
+ run : |
62
+ ansible --version
63
+ molecule --version
64
+ molecule test -s ${{ matrix.scenario }}
65
+ env :
66
+ MOLECULE_DISTRO : ${{ matrix.distro }}
Original file line number Diff line number Diff line change
1
+ collections :
2
+ - name : community.mysql
3
+ - name : community.docker
4
+ - name : community.general
5
+ version : " >=2,<3"
Original file line number Diff line number Diff line change
1
+ ---
2
+
3
+ - name : Converge
4
+ hosts : all
5
+ collections :
6
+ - icinga.icinga
7
+ pre_tasks :
8
+ - ansible.builtin.include_role :
9
+ name : repos
10
+ post_tasks :
11
+ - ansible.builtin.include_role :
12
+ name : icingadb
Original file line number Diff line number Diff line change
1
+ dependency :
2
+ name : galaxy
3
+ options :
4
+ role-file : requirements.yml
Original file line number Diff line number Diff line change
1
+ ---
2
+ dependency :
3
+ name : galaxy
4
+ driver :
5
+ name : docker
6
+ platforms :
7
+ - name : icinga-default
8
+ image : " geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2204}-ansible:latest"
9
+ command : ${MOLECULE_DOCKER_COMMAND:-""}
10
+ volumes :
11
+ - /sys/fs/cgroup:/sys/fs/cgroup:rw
12
+ cgroupns_mode : host
13
+ privileged : true
14
+ pre_build_image : true
15
+ provisioner :
16
+ name : ansible
17
+ inventory :
18
+ link :
19
+ host_vars : host_vars/
20
+ verifier :
21
+ name : testinfra
22
+ directory : tests/integration/
23
+ lint : |
24
+ set -e
25
+ yamllint --no-warnings roles/
26
+ ansible-lint roles/
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : Prepare
3
+ hosts : all
4
+ tasks :
5
+ - name : Install requirements for Debian
6
+ apt :
7
+ name :
8
+ - gpg
9
+ - apt-transport-https
10
+ update_cache : yes
11
+ when : ansible_os_family == "Debian"
Original file line number Diff line number Diff line change
1
+ roles :
2
+ - geerlingguy.mysql
You can’t perform that action at this time.
0 commit comments