add option to netbox role for custom pipeline code for OIDC mapping
All checks were successful
/ Ansible Lint (push) Successful in 1m36s
/ Ansible Lint (pull_request) Successful in 1m36s

Add option to netbox role for ensuring custom pipeline code for OIDC
group and role mapping is either present or not.

The custom pipeline code is licensed under the Creative Commons: CC
BY-SA 4.0 license.

See:
https://github.com/goauthentik/authentik/blob/main/LICENSE
https://github.com/goauthentik/authentik/blob/main/website/integrations/services/netbox/index.md
https://docs.goauthentik.io/integrations/services/netbox/
5676b1a468
This commit is contained in:
June 2025-02-15 05:22:21 +01:00
commit 09a8551c8a
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0
6 changed files with 95 additions and 2 deletions

View file

@ -25,6 +25,27 @@
- Run upgrade script
- Ensure netbox systemd services are set up and up-to-date
- name: Ensures custom pipeline code for OIDC group and role mapping is present
ansible.builtin.copy:
src: custom_pipeline_oidc_group_and_role_mapping.py
dest: /opt/netbox/netbox/netbox/custom_pipeline_oidc_mapping.py
mode: "0644"
owner: root
group: root
when: netbox__custom_pipeline_oidc_group_and_role_mapping
become: true
notify:
- Ensure netbox systemd services are set up and up-to-date
- name: Ensures custom pipeline code for OIDC group and role mapping is not present
ansible.builtin.file:
path: /opt/netbox/netbox/netbox/custom_pipeline_oidc_mapping.py
state: absent
when: not netbox__custom_pipeline_oidc_group_and_role_mapping
become: true
notify:
- Ensure netbox systemd services are set up and up-to-date
- name: Ensure netbox user
block:
- name: Ensure netbox group exists