Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dcf07b1ebb | |||
| 2d569848a7 | |||
| eb6bde9445 |
472 changed files with 24058 additions and 10430 deletions
|
|
@ -3,11 +3,7 @@ skip_list:
|
|||
- "name[casing]"
|
||||
|
||||
exclude_paths:
|
||||
- .ansible/
|
||||
- .forgejo/
|
||||
- "**/*.sops.yaml"
|
||||
- ansible_collections/
|
||||
- collections/
|
||||
- galaxy_roles/
|
||||
- docs/
|
||||
- resources/
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ jobs:
|
|||
# work in our environmnet.
|
||||
# Rather manually setup python (pip) before instead.
|
||||
- name: Run ansible-lint
|
||||
uses: https://github.com/ansible/ansible-lint@v26.6.0
|
||||
uses: https://github.com/ansible/ansible-lint@v26.3.0
|
||||
with:
|
||||
setup_python: "false"
|
||||
requirements_file: "requirements.yml"
|
||||
|
|
|
|||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -1,4 +1,2 @@
|
|||
.ansible/
|
||||
**/__pycache__
|
||||
**/.DS_store
|
||||
|
||||
**/__pycache__
|
||||
266
.sops.yaml
266
.sops.yaml
|
|
@ -1,20 +1,18 @@
|
|||
keys:
|
||||
admins: &admin_keys
|
||||
pgp: &admin_pgp_keys
|
||||
- &admin_pgp_djerun EF643F59E008414882232C78FFA8331EEB7D6B70
|
||||
- &admin_pgp_stb 21C9579E6503CA815A68ABD8541F9408A813C8B7
|
||||
- &admin_pgp_fi 9633412309CCB83BFA39BA5F2FEF746201D7FCFE
|
||||
- &admin_pgp_june 057870A2C72CD82566A3EC983695F4FCBCAE4912
|
||||
- &admin_pgp_haegar F38C9D4228FC6F674E322D9C3326D914EB9B8F55
|
||||
# - &admin_pgp_dario 5DA93D5C9D7320E1BD3522C79C78172B3551C9FD # expired
|
||||
- &admin_pgp_echtnurich 8996B62CBD159DCADD3B6DC08BB33A8ABCF7BC4A
|
||||
- &admin_pgp_c6ris B71138A6A8964A3C3B8899857B4F70C356765BAB
|
||||
- &admin_pgp_lilly D2E9C0807BF681F5E164DAFC5EE1B61CD90954CD
|
||||
- &admin_pgp_langoor 878FEA3CB6A6F6E7CD80ECBE28506E3585F9F533
|
||||
- &admin_pgp_bitwhisker 41FFAF3D519CF5C039FBD8414BCC213729AF0E49
|
||||
age: &admin_age_keys
|
||||
- &admin_age_jtbx ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBQgnQAq6FUSDK8bxtYPjx3oRCAKG+xy9J3Gas2ztJk
|
||||
- &admin_age_c6ris age1yubikey1qv7jkffslarpma2fxjm9gnq43xfvwdws0m6y3u58h033edwdyg0uzt8jl5n
|
||||
admins:
|
||||
gpg: &admin_gpg_keys
|
||||
- &admin_gpg_djerun EF643F59E008414882232C78FFA8331EEB7D6B70
|
||||
- &admin_gpg_stb 21C9579E6503CA815A68ABD8541F9408A813C8B7
|
||||
- &admin_gpg_jtbx 18DFCE01456DAB52EA38A6584EDC64F35FA1D6A5
|
||||
- &admin_gpg_fi 9633412309CCB83BFA39BA5F2FEF746201D7FCFE
|
||||
- &admin_gpg_june 057870A2C72CD82566A3EC983695F4FCBCAE4912
|
||||
- &admin_gpg_haegar F38C9D4228FC6F674E322D9C3326D914EB9B8F55
|
||||
# - &admin_gpg_dario 5DA93D5C9D7320E1BD3522C79C78172B3551C9FD # expired
|
||||
- &admin_gpg_echtnurich 8996B62CBD159DCADD3B6DC08BB33A8ABCF7BC4A
|
||||
- &admin_gpg_c6ristian B71138A6A8964A3C3B8899857B4F70C356765BAB
|
||||
- &admin_gpg_lilly D2E9C0807BF681F5E164DAFC5EE1B61CD90954CD
|
||||
- &admin_gpg_langoor 878FEA3CB6A6F6E7CD80ECBE28506E3585F9F533
|
||||
- &admin_gpg_bitwhisker 41FFAF3D519CF5C039FBD8414BCC213729AF0E49
|
||||
hosts:
|
||||
chaosknoten:
|
||||
age: &host_chaosknoten_age_keys
|
||||
|
|
@ -29,7 +27,6 @@ keys:
|
|||
- &host_renovate_ansible_pull_age_key age18qam683rva3ee3wgue7r0ey4ws4jttz4a4dpe3q8kq8lmrp97ezq2cns8d
|
||||
- &host_ccchoir_ansible_pull_age_key age19rg2cuj9smv8nzxmr03azfqe69edhep53dep6kvh83paf08zv58sntm0fg
|
||||
- &host_tickets_ansible_pull_age_key age16znyzvquuy8467gg27mdwdt8k6kcu3fjrvfm6gnl4nmqp8tuvqaspqgcet
|
||||
- &host_jitsi_ansible_pull_age_key age187zdk64205lx7r83a4m26pfa8hq6khc8sf83k266jasngeq08v3sfqswfg
|
||||
- &host_keycloak_ansible_pull_age_key age1azkgwrcwqhc6flj7gturptpl2uvay6pd94cam4t6yuk2n4wlnsqsj38hca
|
||||
- &host_lists_ansible_pull_age_key age17x20h3m6wgfhereusc224u95ac8aj68fzlkkj5ptvs9c5vlz3usqdu7crq
|
||||
- &host_mumble_ansible_pull_age_key age1wnympe3x8ce8hk87cymmt6wvccs4aes5rhhs44hq0s529v5z4g5sfyphwx
|
||||
|
|
@ -39,13 +36,9 @@ keys:
|
|||
- &host_ntfy_ansible_pull_age_key age1dkecypmfuj0tcm2cz8vnvq5drpu2ddhgnfkzxvscs7m4e79gpseqyhr9pg
|
||||
- &host_spaceapiccc_ansible_pull_age_key age1mdtnk78aeqnwqadjqje5pfha04wu92d3ecchyqajjmy434kwq98qksq2wa
|
||||
- &host_acmedns_ansible_pull_age_key age16pxqxdj25xz6w200sf8duc62vyk0xkhzc7y63nyhg29sm077vp8qy4sywv
|
||||
- &host_draupnir_ansible_pull_age_key age1hv7m3xypesdfm0dfzwgctde8v307g9xaunnfu2687y0lagcs5q7s3eg0kj
|
||||
- &host_mjolnir_ansible_pull_age_key age1hv7m3xypesdfm0dfzwgctde8v307g9xaunnfu2687y0lagcs5q7s3eg0kj
|
||||
- &host_diday_staging_runner_ansible_pull_age_key age1522f3qzddm82w63j7ajdkr0khvced6ht7tzp3grvp0j3hewtvesssr5kpf
|
||||
- &host_auth_dns_ansible_pull_age_key age18zgt4y2sd75hxnpe333zz39048ctxpr0q8a3uqh3jajjkyawsdrq8yg5ve
|
||||
- &host_forgejo_runner_ansible_pull_age_key age1az0k6cadssk6r8qcqxfr8cyu5mndy59pwt8yqq6w065ew6au4ezsmg2vkf
|
||||
- &host_forgejo_runner_external_ansible_pull_age_key age1pq1jqrcp3te50xugmv5wst3s9ahj0d38rfktxt43wlcqz7vnwyn3y2h7kyfr6rckrvmuk9m7yvp4efjnfsuxx6d8r9gn222r2eal5593arywrjwrgeypf745wyuvf3z2xk9tm5fgnwckftuvdggk66fph59rw69nt5dpjeewuww4vzt9gs4xelre952s7zjz56qv8tvesg2c89sp8rmy9dvhwfd6tucjhs6sjr6yp2njjra2u6w7c7f0sch3rwkw3wf2dc9su9aaa9q2f22sh5yf0fqejxa2qqpq4pg752589st5xsa5g8tpkjglj4tn35gd4hjj0xet9cjwhydmkmmkffy3nr8zdtctqu6pqsyf7aphvktryez39ru3qe7m6nvr465ffxr0ltvr85nddzxvcwpwpac64nu5tdfrxgjfqzc99vr3zxv8carpsw5evmruqlvrq6v6a4m2cwsz5gqw7nyk3jlj75kp5cnafzjn5dyrf8ppfhp5g5s34zsl7pejmmx2uuudjt7ru2y7as9mtagykrgqgt80fvp3eeh4gsmmd3ujgtp0ranq28aq9x0xdekqh49pfhhprjj6zqdfac5gxtjj736kh5jktc4ls4mjs3p33rzt6ze54uqsfept3qhua2pmugypup6hm6j2ek5sgxjnwvqyfj2l8vz4yfgkaxf699v7jqlwf7g68ang5kzqrjsu78lyardm4zen8zhrr24j334qdgs4zr8dhsfsnmvx9cdvu0swx27tcz8txs46zds9kekgmua7w7fnw3l2lf6zla956ssycac4zjy87rawr4thusxtcqgfzfzh2za9np0s34e5dwkp2l2k06cq09myxqfe7ze6a53d8sl5j43qcekh6kfvl9k0t7903q99pc35630zwm3hwxgnw354du5gngnz56skq9zx3pcnkr5eyh8r8t0dqudmvrrwmxreu6tgrklxw7yvu3zkjgt3gyjhc8kqcrevlukay45sz4k9zqxx9yrs88hzt4h52r2g74alf3cedes3atufy06q4lfq3nxdlnve0kqcwstzr6z6u7fqpqvacezdrr62ycteju6dqawkpthu0drtlxj547htfjcsnrmhgvhskwtuhk6yp7wp30p7qc5vkk8fegg6qx5kc9xs4trx7hj9xgydu7vd30hkceuxsczywjs9v2fl3svkwfypg62882yq6ltv7gfj4ajuy8ezd76g0z7juwspe7q6zs5ceshd6038tvvh2nlpjty6rg6a9qfzhgmjx9s6hynyk7xnq9zra6hxstg8p58x75hapd2mk6rapfunlnnkz5dsxjf4ud4dsvgjfjpzxcdy7sp8dzxtengrsdyu4824mqlw8p63d7m2z4mcyme4tm2qkugtdgrkyphe7akk2geukf6xkfkzd2pkdq5s3qm9fkvfkgrv6yw5kdgjak8xcgesg6tumans4fs8yrxtqlvv2z3emdvwchrjfq4xpzsj27yt4gdg8pknwz9tqpjkjxq6lysutrvwkvt2fwyj8wvv8wtmdl6fk6rsd9kq9a6wkhuq7vvrgwgj3xg2s229sprj4g2vzhy2dfesrp403gs64jqkrjuezwm4zd6uw2x4e2qkj8xqcf7c0zprdzu959x23u878vqqetgpjwt0z3kedt8l6dgpm0rf5dmrya5h3wgzfa0jjvgjphyxgxrwlrzpv4czgal933zs64tn90ks66ejjdaw4t67sch8r3q0kljeqnpdgmw0cpj6arc6k46wcqaccygczy76zt9362vslakvzqqv33tv3sjldp6qxprharmpm9uykgpx66343wuur5xj2aw0rgutpm4ztjzycn3a8d2jq2zpdzwmevezm7mkp9dmndkc3qz0kklgkxq9yehrk5ayfly97umhws0jll8qqg0r7gzxgw5vv76
|
||||
- &host_matrix_sync_external_ansible_pull_age_key age1q7kz3pnfq6cvtn56rlfgs52efcvtcmaq4xny0va3x5wxj4vpgccsenwxk6
|
||||
- &host_hta_ansible_pull_age_key age1n44q80zmsnq8dehnkm8g78u0ku48zafrq4vg5pzz8ft9jkqja5jsamwxhn
|
||||
external:
|
||||
age: &host_external_age_keys
|
||||
- &host_status_ansible_pull_age_key age1p546j6whqsyfkjuf674lawrnk2ex653fuvwhcwt46gkrspkq59sqzm5y87
|
||||
|
|
@ -55,240 +48,203 @@ keys:
|
|||
- &host_light_ansible_pull_age_key age1llkxtfx4dgnezmukj4ganx4ql9k4ga4ca9zuanf5r568jfp8peeqal490q
|
||||
- &host_waybackproxy_ansible_pull_age_key age197tmckjll9999v5apqh5h70dktdxzxn92uyzce5j7jmesvnneecs9p7m5j
|
||||
- &host_yate_ansible_pull_age_key age1yc9s8r7zt6tc7scfyxc3345khdwqrx0lwj4z6yp56h6rmauev50s5yqr22
|
||||
- &host_z9_router_ansible_pull_age_key age1tx03yh67f052jzehvtvzmhe5ja6ca0rlugw8pr9v7q67z38w2ahs2a4alp
|
||||
|
||||
creation_rules:
|
||||
## group vars
|
||||
- path_regex: "inventories/chaosknoten/group_vars/.+\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
*host_chaosknoten_age_keys
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/external/group_vars/.+\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
*host_external_age_keys
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/z9/group_vars/.+\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
*host_z9_age_keys
|
||||
merge:
|
||||
- *admin_keys
|
||||
## host vars
|
||||
# chaosknoten hosts
|
||||
- path_regex: "inventories/chaosknoten/host_vars/acmedns\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_acmedns_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/cloud\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_cloud_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/jitsi\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- *host_jitsi_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/keycloak\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_keycloak_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/grafana\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_grafana_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/pad\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_pad_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/ccchoir\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_ccchoir_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/pretalx\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_pretalx_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/netbox\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_netbox_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/hta\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- *host_hta_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/tickets\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_tickets_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/onlyoffice\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_onlyoffice_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/zammad\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_zammad_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/ntfy\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_ntfy_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/eh22-wiki\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_eh22_wiki_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/sunders\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_sunders_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/wiki\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_wiki_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/renovate\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_renovate_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/lists\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_lists_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/mumble\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_mumble_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/public-reverse-proxy\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_public_reverse_proxy_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/spaceapiccc\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_spaceapiccc_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/draupnir\\.sops\\..+"
|
||||
- path_regex: "inventories/chaosknoten/host_vars/mjolnir\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- *host_draupnir_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_mjolnir_ansible_pull_age_key
|
||||
- path_regex: "inventories/chaosknoten/host_vars/diday-staging-runner\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_diday_staging_runner_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/auth-dns\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_auth_dns_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/forgejo-runner\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- *host_forgejo_runner_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/forgejo-runner-external\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- *host_forgejo_runner_external_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/chaosknoten/host_vars/matrix-sync\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- *host_matrix_sync_external_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
# external hosts
|
||||
- path_regex: "inventories/external/host_vars/status\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_status_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
# z9 hosts
|
||||
- path_regex: "inventories/z9/host_vars/dooris\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_dooris_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/z9/host_vars/light\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_light_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/z9/host_vars/waybackproxy\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_waybackproxy_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/z9/host_vars/yate\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- pgp:
|
||||
*admin_gpg_keys
|
||||
age:
|
||||
- *host_yate_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
- path_regex: "inventories/z9/host_vars/z9-router\\.sops\\..+"
|
||||
key_groups:
|
||||
- age:
|
||||
- *host_z9_router_ansible_pull_age_key
|
||||
merge:
|
||||
- *admin_keys
|
||||
# general
|
||||
- path_regex: ".+\\.sops\\..+"
|
||||
key_groups:
|
||||
- *admin_keys
|
||||
- pgp: *admin_gpg_keys
|
||||
|
||||
stores:
|
||||
yaml:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
rules:
|
||||
brackets:
|
||||
forbid: false
|
||||
min-spaces-inside: 1
|
||||
max-spaces-inside: 1
|
||||
min-spaces-inside-empty: 1
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Folgende Geräte und Server werden duch dieses Ansible Repository verwaltet:
|
||||
|
||||
* Diverse VMs im z9 (PVE Cluster)
|
||||
* Diverse VMs auf dem ThinkCCCluster
|
||||
* Diverse VMs auf dem Chaosknoten
|
||||
|
||||
Host-spezifische Konfigurationsdateien liegen unter `resources/` und werden für jeweils über eine `host_vars`-Datei im Inventory geladen.
|
||||
|
|
|
|||
18
ansible_collections/grafana/grafana/.ansible-lint
Normal file
18
ansible_collections/grafana/grafana/.ansible-lint
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
profile: production
|
||||
|
||||
exclude_paths:
|
||||
- .cache/
|
||||
- .github/
|
||||
- examples/
|
||||
|
||||
parseable: true
|
||||
verbosity: 1
|
||||
|
||||
use_default_rules: true
|
||||
|
||||
skip_list:
|
||||
- '204' # Allow string length greater than 160 chars
|
||||
- 'no-changed-when' # False positives for running command shells
|
||||
- 'yaml' # Disable YAML linting since it's done by yamllint
|
||||
- 'empty-string-compare' # Allow compare to empty string
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
platforms:
|
||||
- name: almalinux-8
|
||||
image: dokken/almalinux-8
|
||||
pre_build_image: true
|
||||
privileged: true
|
||||
cgroup_parent: docker.slice
|
||||
command: /lib/systemd/systemd
|
||||
- name: almalinux-9
|
||||
image: dokken/almalinux-9
|
||||
pre_build_image: true
|
||||
privileged: true
|
||||
cgroup_parent: docker.slice
|
||||
command: /lib/systemd/systemd
|
||||
- name: centos-7
|
||||
image: dokken/centos-7
|
||||
pre_build_image: true
|
||||
privileged: true
|
||||
cgroup_parent: docker.slice
|
||||
command: /usr/lib/systemd/systemd
|
||||
- name: centos-stream-8
|
||||
image: dokken/centos-stream-8
|
||||
pre_build_image: true
|
||||
privileged: true
|
||||
cgroup_parent: docker.slice
|
||||
command: /lib/systemd/systemd
|
||||
- name: centos-stream-9
|
||||
image: dokken/centos-stream-9
|
||||
pre_build_image: true
|
||||
privileged: true
|
||||
cgroup_parent: docker.slice
|
||||
command: /lib/systemd/systemd
|
||||
- name: debian-10
|
||||
image: dokken/debian-10
|
||||
pre_build_image: true
|
||||
privileged: true
|
||||
cgroup_parent: docker.slice
|
||||
command: /lib/systemd/systemd
|
||||
- name: debian-11
|
||||
image: dokken/debian-11
|
||||
pre_build_image: true
|
||||
privileged: true
|
||||
cgroup_parent: docker.slice
|
||||
command: /lib/systemd/systemd
|
||||
- name: fedora-36
|
||||
image: dokken/fedora-36
|
||||
pre_build_image: true
|
||||
privileged: true
|
||||
cgroup_parent: docker.slice
|
||||
command: /lib/systemd/systemd
|
||||
- name: fedora-37
|
||||
image: dokken/fedora-37
|
||||
pre_build_image: true
|
||||
privileged: true
|
||||
cgroup_parent: docker.slice
|
||||
command: /lib/systemd/systemd
|
||||
- name: ubuntu-18.04
|
||||
image: dokken/ubuntu-18.04
|
||||
pre_build_image: true
|
||||
privileged: true
|
||||
cgroup_parent: docker.slice
|
||||
command: /lib/systemd/systemd
|
||||
- name: ubuntu-20.04
|
||||
image: dokken/ubuntu-20.04
|
||||
pre_build_image: true
|
||||
privileged: true
|
||||
cgroup_parent: docker.slice
|
||||
command: /lib/systemd/systemd
|
||||
- name: ubuntu-22.04
|
||||
image: dokken/ubuntu-22.04
|
||||
pre_build_image: true
|
||||
privileged: true
|
||||
cgroup_parent: docker.slice
|
||||
command: /lib/systemd/systemd
|
||||
provisioner:
|
||||
env:
|
||||
ANSIBLE_INJECT_FACT_VARS: false
|
||||
verifier:
|
||||
name: testinfra
|
||||
42
ansible_collections/grafana/grafana/.editorconfig
Normal file
42
ansible_collections/grafana/grafana/.editorconfig
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# This file is the top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# All Files
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
# JSON Files
|
||||
[*.{json,json5,webmanifest}]
|
||||
indent_size = 2
|
||||
|
||||
# YAML Files
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
# Markdown Files
|
||||
[*.{md,mdx}]
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
# Web Files
|
||||
[*.{htm,html,js,jsm,ts,tsx,cjs,cts,ctsx,mjs,mts,mtsx,css,sass,scss,less,pcss,svg,vue}]
|
||||
indent_size = 2
|
||||
|
||||
# Bash Files
|
||||
[*.sh]
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
|
||||
# Makefiles
|
||||
[{Makefile,**.mk}]
|
||||
indent_style = tab
|
||||
|
||||
# Python Files
|
||||
[*.py]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
11
ansible_collections/grafana/grafana/.github/dependabot.yml
vendored
Normal file
11
ansible_collections/grafana/grafana/.github/dependabot.yml
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "pip" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
45
ansible_collections/grafana/grafana/.github/workflows/alloy-molecule.yml
vendored
Normal file
45
ansible_collections/grafana/grafana/.github/workflows/alloy-molecule.yml
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
name: Alloy Molecule
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: roles/alloy
|
||||
|
||||
jobs:
|
||||
molecule:
|
||||
name: Molecule
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
distro:
|
||||
- rockylinux9
|
||||
- ubuntu2204
|
||||
- debian12
|
||||
- opensuseleap15
|
||||
|
||||
steps:
|
||||
- name: Check out the codebase.
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install test dependencies.
|
||||
run: pip3 install ansible molecule molecule-plugins[docker] docker
|
||||
|
||||
- name: Run Molecule tests.
|
||||
run: molecule test
|
||||
env:
|
||||
PY_COLORS: '1'
|
||||
ANSIBLE_FORCE_COLOR: '1'
|
||||
MOLECULE_DISTRO: ${{ matrix.distro }}
|
||||
69
ansible_collections/grafana/grafana/.github/workflows/full-integration-test.yml
vendored
Normal file
69
ansible_collections/grafana/grafana/.github/workflows/full-integration-test.yml
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
---
|
||||
name: Full Integration Test
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
workflow_dispatch:
|
||||
env:
|
||||
NAMESPACE: grafana
|
||||
COLLECTION_NAME: grafana
|
||||
|
||||
jobs:
|
||||
|
||||
integration:
|
||||
runs-on: ubuntu-20.04
|
||||
name: ${{ matrix.ansible }}-py${{ matrix.python }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
ansible:
|
||||
- stable-2.11
|
||||
- stable-2.12
|
||||
- stable-2.13
|
||||
- devel
|
||||
python:
|
||||
- '2.7'
|
||||
- '3.5'
|
||||
- '3.6'
|
||||
- '3.7'
|
||||
- '3.8'
|
||||
- '3.9'
|
||||
- '3.10'
|
||||
exclude:
|
||||
- ansible: stable-2.11
|
||||
python: '3.10'
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
- name: create integration_config
|
||||
working-directory: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/tests/integration
|
||||
run: |
|
||||
cat <<EOF > integration_config.yml
|
||||
stack_name: ${{ secrets.ANSIBLE_TEST_STACK_NAME }}
|
||||
org_name: ${{ secrets.ANSIBLE_TEST_ORG_NAME }}
|
||||
grafana_cloud_api_key: ${{ secrets.ANSIBLE_TEST_CLOUD_API_KEY }}
|
||||
grafana_api_key: ${{ secrets.ANSIBLE_TEST_GRAFANA_API_KEY }}
|
||||
test_stack_name: ${{ secrets.ANSIBLE_TEST_CI_STACK }}
|
||||
EOF
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install ansible-base (${{ matrix.ansible }})
|
||||
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
|
||||
|
||||
- name: Test Modules
|
||||
run: ansible-test integration -v alert_contact_point alert_notification_policy cloud_api_key cloud_plugin cloud_stack dashboard datasource folder --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker
|
||||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
- name: Cooling Period
|
||||
run: sleep 3m
|
||||
63
ansible_collections/grafana/grafana/.github/workflows/lint.yaml
vendored
Normal file
63
ansible_collections/grafana/grafana/.github/workflows/lint.yaml
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
---
|
||||
name: Lint
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Perform Linting
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install shellcheck
|
||||
run: |
|
||||
wget -c https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.linux.x86_64.tar.xz -O shellcheck.tar.xz && \
|
||||
tar -xvf shellcheck.tar.xz && \
|
||||
sudo mv ./shellcheck-v0.9.0/shellcheck /usr/bin/shellcheck && \
|
||||
rm -rf shellcheck-v0.9.0
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install pipenv
|
||||
run: |
|
||||
python -m pip install --upgrade pipenv wheel
|
||||
|
||||
- name: Install dependencies
|
||||
run: make install
|
||||
|
||||
- name: Shell Linting
|
||||
run: make ci-lint-shell
|
||||
if: success() || failure()
|
||||
|
||||
# - name: Markdown Linting
|
||||
# run: make ci-lint-markdown
|
||||
# if: success() || failure()
|
||||
|
||||
# - name: Text Linting
|
||||
# run: make ci-lint-text
|
||||
# if: success() || failure()
|
||||
|
||||
- name: Yaml Linting
|
||||
run: make ci-lint-yaml
|
||||
if: success() || failure()
|
||||
|
||||
- name: Editorconfig Linting
|
||||
run: make ci-lint-editorconfig
|
||||
if: success() || failure()
|
||||
|
||||
- name: Ansible Linting
|
||||
run: make ci-lint-ansible
|
||||
if: success() || failure()
|
||||
44
ansible_collections/grafana/grafana/.github/workflows/loki-molecule.yml
vendored
Normal file
44
ansible_collections/grafana/grafana/.github/workflows/loki-molecule.yml
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
name: Loki Molecule
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: roles/loki
|
||||
|
||||
jobs:
|
||||
molecule:
|
||||
name: Molecule
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
distro:
|
||||
- rockylinux9
|
||||
- ubuntu2204
|
||||
- debian12
|
||||
|
||||
steps:
|
||||
- name: Check out the codebase.
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install test dependencies.
|
||||
run: pip3 install ansible molecule molecule-plugins[docker] docker
|
||||
|
||||
- name: Run Molecule tests.
|
||||
run: molecule test
|
||||
env:
|
||||
PY_COLORS: '1'
|
||||
ANSIBLE_FORCE_COLOR: '1'
|
||||
MOLECULE_DISTRO: ${{ matrix.distro }}
|
||||
51
ansible_collections/grafana/grafana/.github/workflows/mimir-molecule.yml
vendored
Normal file
51
ansible_collections/grafana/grafana/.github/workflows/mimir-molecule.yml
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
name: Mimir Molecule
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: roles/mimir
|
||||
|
||||
jobs:
|
||||
molecule:
|
||||
name: Molecule
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
distro:
|
||||
- rockylinux9
|
||||
- rockylinux8
|
||||
- ubuntu2204
|
||||
- debian12
|
||||
|
||||
steps:
|
||||
- name: Check out the codebase.
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install test dependencies.
|
||||
run: pip3 install ansible-core==2.16 'molecule-plugins[docker]' pytest-testinfra jmespath selinux passlib
|
||||
|
||||
- name: create docker network
|
||||
run: docker network create molecule
|
||||
|
||||
- name: Start s3 backend
|
||||
run: docker run -d -p 9000:9000 -p 9001:9001 --name minio-mimir --network molecule -e "MINIO_ROOT_USER=testtest" -e "MINIO_ROOT_PASSWORD=testtest" -e "MINIO_DEFAULT_BUCKETS=mimir" bitnamilegacy/minio:latest
|
||||
|
||||
- name: Run Molecule tests.
|
||||
run: molecule --debug test
|
||||
env:
|
||||
PY_COLORS: '1'
|
||||
ANSIBLE_FORCE_COLOR: '1'
|
||||
MOLECULE_DISTRO: ${{ matrix.distro }}
|
||||
98
ansible_collections/grafana/grafana/.github/workflows/modules-test.yml
vendored
Normal file
98
ansible_collections/grafana/grafana/.github/workflows/modules-test.yml
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
---
|
||||
name: Modules Test
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 6 * * *'
|
||||
env:
|
||||
NAMESPACE: grafana
|
||||
COLLECTION_NAME: grafana
|
||||
|
||||
jobs:
|
||||
|
||||
sanity:
|
||||
name: Sanity (Ⓐ${{ matrix.ansible }})
|
||||
strategy:
|
||||
matrix:
|
||||
ansible:
|
||||
- stable-2.12
|
||||
- stable-2.13
|
||||
- stable-2.14
|
||||
- devel
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install ansible-base (${{ matrix.ansible }})
|
||||
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
|
||||
|
||||
- name: Run sanity tests
|
||||
run: ansible-test sanity -v --docker --color --coverage
|
||||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
integration:
|
||||
runs-on: ubuntu-20.04
|
||||
name: Integration (Ⓐ${{ matrix.ansible }}-py${{ matrix.python }})
|
||||
strategy:
|
||||
fail-fast: true
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
ansible:
|
||||
- stable-2.13
|
||||
python:
|
||||
- '3.10'
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
- name: create integration_config
|
||||
working-directory: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/tests/integration
|
||||
run: |
|
||||
cat <<EOF > integration_config.yml
|
||||
org_name: ${{ secrets.ANSIBLE_TEST_ORG_NAME }}
|
||||
grafana_cloud_api_key: ${{ secrets.ANSIBLE_TEST_CLOUD_API_KEY }}
|
||||
grafana_api_key: ${{ secrets.ANSIBLE_TEST_GRAFANA_API_KEY }}
|
||||
grafana_url: ${{ secrets.ANSIBLE_GRAFANA_URL }}
|
||||
test_stack_name: ${{ secrets.ANSIBLE_TEST_CI_STACK }}
|
||||
EOF
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
|
||||
- name: Install ansible-base (${{ matrix.ansible }})
|
||||
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
|
||||
|
||||
- name: Install Requests
|
||||
run: pip install requests
|
||||
|
||||
- name: Create Test Stack
|
||||
run: ansible-test integration -v create_cloud_stack --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker
|
||||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
- name: Test Modules
|
||||
run: ansible-test integration -v alert_contact_point alert_notification_policy cloud_api_key cloud_plugin dashboard datasource folder --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker
|
||||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
- name: Delete Test Stack
|
||||
if: success() || failure()
|
||||
run: ansible-test integration -v delete_cloud_stack --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker
|
||||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
44
ansible_collections/grafana/grafana/.github/workflows/opentelemetry-collector-molecule.yml
vendored
Normal file
44
ansible_collections/grafana/grafana/.github/workflows/opentelemetry-collector-molecule.yml
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
name: OpenTelemetry Collector Molecule
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: roles/opentelemetry_collector
|
||||
|
||||
jobs:
|
||||
molecule:
|
||||
name: Molecule
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
scenario:
|
||||
- default
|
||||
- default-check-first
|
||||
- latest
|
||||
- non-contrib
|
||||
|
||||
steps:
|
||||
- name: Check out the codebase.
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install test dependencies.
|
||||
run: pip3 install ansible molecule molecule-plugins[docker] docker pytest-testinfra
|
||||
|
||||
- name: Run Molecule tests.
|
||||
run: molecule test -s ${{ matrix.scenario }}
|
||||
env:
|
||||
PY_COLORS: '1'
|
||||
ANSIBLE_FORCE_COLOR: '1'
|
||||
44
ansible_collections/grafana/grafana/.github/workflows/promtail-molecule.yml
vendored
Normal file
44
ansible_collections/grafana/grafana/.github/workflows/promtail-molecule.yml
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
name: Promtail Molecule
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: roles/promtail
|
||||
|
||||
jobs:
|
||||
molecule:
|
||||
name: Molecule
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
distro:
|
||||
- rockylinux9
|
||||
- ubuntu2204
|
||||
- debian12
|
||||
|
||||
steps:
|
||||
- name: Check out the codebase.
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install test dependencies.
|
||||
run: pip3 install ansible molecule molecule-plugins[docker] docker
|
||||
|
||||
- name: Run Molecule tests.
|
||||
run: molecule test
|
||||
env:
|
||||
PY_COLORS: '1'
|
||||
ANSIBLE_FORCE_COLOR: '1'
|
||||
MOLECULE_DISTRO: ${{ matrix.distro }}
|
||||
159
ansible_collections/grafana/grafana/.github/workflows/release.yml
vendored
Normal file
159
ansible_collections/grafana/grafana/.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
---
|
||||
name: GitHub Release
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version number to release'
|
||||
required: true
|
||||
env:
|
||||
NAMESPACE: grafana
|
||||
COLLECTION_NAME: grafana
|
||||
|
||||
jobs:
|
||||
sanity:
|
||||
name: Sanity (Ⓐ${{ matrix.ansible }})
|
||||
strategy:
|
||||
matrix:
|
||||
ansible:
|
||||
- stable-2.12
|
||||
- stable-2.13
|
||||
- stable-2.14
|
||||
- devel
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install ansible-base (${{ matrix.ansible }})
|
||||
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
|
||||
|
||||
- name: Run sanity tests
|
||||
run: ansible-test sanity -v --docker --color --coverage
|
||||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
integration:
|
||||
runs-on: ubuntu-20.04
|
||||
name: Integration (Ⓐ${{ matrix.ansible }}-py${{ matrix.python }})
|
||||
strategy:
|
||||
fail-fast: true
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
ansible:
|
||||
- stable-2.13
|
||||
python:
|
||||
- '3.10'
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
- name: create integration_config
|
||||
working-directory: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/tests/integration
|
||||
run: |
|
||||
cat <<EOF > integration_config.yml
|
||||
org_name: ${{ secrets.ANSIBLE_TEST_ORG_NAME }}
|
||||
grafana_cloud_api_key: ${{ secrets.ANSIBLE_TEST_CLOUD_API_KEY }}
|
||||
grafana_api_key: ${{ secrets.ANSIBLE_TEST_GRAFANA_API_KEY }}
|
||||
grafana_url: ${{ secrets.ANSIBLE_GRAFANA_URL }}
|
||||
test_stack_name: ${{ secrets.ANSIBLE_TEST_CI_STACK }}
|
||||
EOF
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
|
||||
- name: Install ansible-base (${{ matrix.ansible }})
|
||||
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
|
||||
|
||||
- name: Install Requests
|
||||
run: pip install requests
|
||||
|
||||
- name: Create Test Stack
|
||||
run: ansible-test integration -v create_cloud_stack --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker
|
||||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
- name: Test Modules
|
||||
run: ansible-test integration -v alert_contact_point alert_notification_policy cloud_api_key cloud_plugin dashboard datasource folder --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker
|
||||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
- name: Delete Test Stack
|
||||
if: success() || failure()
|
||||
run: ansible-test integration -v delete_cloud_stack --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker
|
||||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
publish:
|
||||
name: Publish to Galaxy
|
||||
runs-on: ubuntu-latest
|
||||
needs: [sanity, integration]
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Ansible
|
||||
run: pip install ansible-core
|
||||
|
||||
- name: Install PyYaml
|
||||
run: pip install pyyaml
|
||||
|
||||
- name: Validate version matches
|
||||
run: |
|
||||
VERSION=$(python -c "import yaml; print(yaml.safe_load(open('galaxy.yml'))['version'])")
|
||||
if [ "$VERSION" != "${{ github.event.inputs.version }}" ]; then
|
||||
echo "Error: Input version (${{ github.event.inputs.version }}) doesn't match galaxy.yml version ($VERSION)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Build collection
|
||||
id: build
|
||||
run: |
|
||||
ansible-galaxy collection build
|
||||
echo "archive_path=$(ls *.tar.gz)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Publish collection to Galaxy
|
||||
env:
|
||||
ANSIBLE_GALAXY_API_KEY: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
|
||||
run: ansible-galaxy collection publish --api-key ${{ secrets.ANSIBLE_GALAXY_API_KEY }} ${{ steps.build.outputs.archive_path }}
|
||||
|
||||
release:
|
||||
name: Create GitHub Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [publish]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install PyYaml
|
||||
run: pip install pyyaml
|
||||
|
||||
- name: Validate version is published to Galaxy
|
||||
run: curl --head -s -f -o /dev/null https://galaxy.ansible.com/download/grafana-grafana-${{ github.event.inputs.version }}.tar.gz
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ github.event.inputs.version }}
|
||||
90
ansible_collections/grafana/grafana/.github/workflows/roles-test.yml
vendored
Normal file
90
ansible_collections/grafana/grafana/.github/workflows/roles-test.yml
vendored
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
---
|
||||
name: Roles Test
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 6 * * *'
|
||||
env:
|
||||
NAMESPACE: grafana
|
||||
COLLECTION_NAME: grafana
|
||||
|
||||
jobs:
|
||||
|
||||
sanity:
|
||||
name: Sanity (Ⓐ${{ matrix.ansible }})
|
||||
strategy:
|
||||
matrix:
|
||||
ansible:
|
||||
- stable-2.12
|
||||
- stable-2.13
|
||||
- stable-2.14
|
||||
- devel
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install ansible-base (${{ matrix.ansible }})
|
||||
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
|
||||
|
||||
- name: Run sanity tests
|
||||
run: ansible-test sanity -v --docker --color --coverage
|
||||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
integration:
|
||||
runs-on: ubuntu-20.04
|
||||
name: Integration (Ⓐ${{ matrix.ansible }}-py${{ matrix.python }})
|
||||
strategy:
|
||||
fail-fast: true
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
ansible:
|
||||
- stable-2.13
|
||||
python:
|
||||
- '3.10'
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
|
||||
- name: create integration_config
|
||||
working-directory: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/tests/integration
|
||||
run: |
|
||||
cat <<EOF > integration_config.yml
|
||||
stack_name: ${{ secrets.ANSIBLE_TEST_STACK_NAME }}
|
||||
org_name: ${{ secrets.ANSIBLE_TEST_ORG_NAME }}
|
||||
grafana_cloud_api_key: ${{ secrets.ANSIBLE_TEST_CLOUD_API_KEY }}
|
||||
grafana_api_key: ${{ secrets.ANSIBLE_TEST_GRAFANA_API_KEY }}
|
||||
grafana_url: ${{ secrets.ANSIBLE_GRAFANA_URL }}
|
||||
test_stack_name: ${{ secrets.ANSIBLE_TEST_CI_STACK }}
|
||||
EOF
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
|
||||
- name: Install ansible-base (${{ matrix.ansible }})
|
||||
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
|
||||
|
||||
- name: Install Requests
|
||||
run: pip install requests
|
||||
|
||||
- name: Test Roles
|
||||
run: ansible-test integration -v molecule-grafana-alternative molecule-grafana-default --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --coverage --docker
|
||||
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue