mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-14 06:17:14 +02:00
Fix false negatives in integration test for unused vars
Updated tests/integration/test_vars_usage_in_yaml.py: - Variables immediately followed by '(' are now treated as function calls, not as set variables. This prevents false errors. - Fixed detection of redirect_domain_mappings so it is no longer flagged as unused. See: https://chatgpt.com/share/68c3542d-f44c-800f-a483-b3e43739f315
This commit is contained in:
@@ -11,10 +11,6 @@
|
||||
- name: "For '{{ application_id }}': load docker, db and proxy"
|
||||
include_role:
|
||||
name: sys-stk-full-stateful
|
||||
vars:
|
||||
# Forward flag into compose templating
|
||||
cmp_extra_facts:
|
||||
akaunting_setup_enabled: "{{ akaunting_setup_enabled }}"
|
||||
|
||||
- name: "Akaunting | Create first-run marker to disable future setup"
|
||||
ansible.builtin.file:
|
||||
|
@@ -2,15 +2,5 @@
|
||||
|
||||
This Ansible role configures Nginx to perform 301 redirects from one domain to another. It handles SSL certificate retrieval for the source domains and sets up the Nginx configuration to redirect to the specified target domains.
|
||||
|
||||
## Role Variables
|
||||
|
||||
- `domain_mappings`: A list of objects with `source` and `target` properties specifying the domains to redirect from and to.
|
||||
- `users.administrator.email`: The email used for SSL certificate registration with Let's Encrypt.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- `sys-stk-front-pure`: A role for setting up HTTPS for Nginx
|
||||
- `letsencrypt`: A role for managing SSL certificates with Let's Encrypt
|
||||
|
||||
## Author Information
|
||||
This role was created in 2023 by [Kevin Veen-Birkenbach](https://www.veen.world/).
|
@@ -10,7 +10,7 @@
|
||||
include_role:
|
||||
name: web-opt-rdr-domains
|
||||
vars:
|
||||
domain_mappings: "{{ REDIRECT_WWW_DOMAINS | map('regex_replace', '^www\\.(.+)$', '{ source: \"www.\\1\", target: \"\\1\" }') | map('from_yaml') | list }}"
|
||||
redirect_domain_mappings: "{{ REDIRECT_WWW_DOMAINS | map('regex_replace', '^www\\.(.+)$', '{ source: \"www.\\1\", target: \"\\1\" }') | map('from_yaml') | list }}"
|
||||
when: REDIRECT_WWW_FLAVOR == 'origin'
|
||||
|
||||
- name: Include DNS role to set redirects
|
||||
|
Reference in New Issue
Block a user