Skip to content

Commit

Permalink
Add ANSIBLE_BASE_MANAGED_ROLE_REGISTRY setting
Browse files Browse the repository at this point in the history
required by AAP-24178 and AAP-25257
  • Loading branch information
bzwei committed Jun 12, 2024
1 parent cbb6a6f commit 383e904
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/aap_eda/settings/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@
Django Ansible Base settings:
For Resource Server the following are required when
ALLOW_LOCAL_RESOURCE_MANAGEMENT is False:
To configure a Resource Server for syncing of managed resources:
* RESOURCE_SERVER__URL - The URL to connect to the resource server
* RESOURCE_SERVER__SECRET_KEY - The secret key needed to pull the resource list
* RESOURCE_SERVER__VALIDATE_HTTPS - Whether to validate https, default to False
* ANSIBLE_BASE_MANAGED_ROLE_REGISTRY - Syncing of the Platform Auditor role
"""
import os
Expand Down Expand Up @@ -655,6 +654,9 @@ def get_rulebook_process_log_level() -> RulebookProcessLogLevel:
}
RESOURCE_JWT_USER_ID = settings.get("RESOURCE_JWT_USER_ID", None)
RESOURCE_SERVICE_PATH = settings.get("RESOURCE_SERVICE_PATH", None)
ANSIBLE_BASE_MANAGED_ROLE_REGISTRY = settings.get(
"ANSIBLE_BASE_MANAGED_ROLE_REGISTRY", {}
)

if RESOURCE_SERVER["URL"] and RESOURCE_SERVER["SECRET_KEY"]:
RQ_PERIODIC_JOBS.append(
Expand Down
1 change: 1 addition & 0 deletions tools/docker/docker-compose-dev-redis-tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ x-environment:
- EDA_RESOURCE_SERVER__SECRET_KEY=${EDA_RESOURCE_SERVER__SECRET_KEY}
- EDA_RESOURCE_SERVER__VALIDATE_HTTPS=${EDA_RESOURCE_SERVER__VALIDATE_HTTPS:-False}
- EDA_RESOURCE_JWT_USER_ID=${EDA_RESOURCE_JWT_USER_ID}
- EDA_ANSIBLE_BASE_MANAGED_ROLE_REGISTRY=${EDA_ANSIBLE_BASE_MANAGED_ROLE_REGISTRY:-@json {}}

services:
podman-pre-setup:
Expand Down
2 changes: 2 additions & 0 deletions tools/docker/docker-compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ x-environment: &common-env
EDA_RESOURCE_SERVER__SECRET_KEY: ${EDA_RESOURCE_SERVER_SECRET__KEY}
EDA_RESOURCE_SERVER__VALIDATE_HTTPS: ${EDA_RESOURCE_SERVER_VALIDATE__HTTPS:-False}
EDA_RESOURCE_JWT_USER_ID: ${EDA_RESOURCE_JWT_USER_ID}
EDA_ANSIBLE_BASE_MANAGED_ROLE_REGISTRY: >
${EDA_ANSIBLE_BASE_MANAGED_ROLE_REGISTRY:-@json {}}
services:
podman-pre-setup-node1:
Expand Down
1 change: 1 addition & 0 deletions tools/docker/docker-compose-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ x-environment:
- EDA_RESOURCE_SERVER__SECRET_KEY=${EDA_RESOURCE_SERVER__SECRET_KEY}
- EDA_RESOURCE_SERVER__VALIDATE_HTTPS=${EDA_RESOURCE_SERVER__VALIDATE_HTTPS:-False}
- EDA_RESOURCE_JWT_USER_ID=${EDA_RESOURCE_JWT_USER_ID}
- EDA_ANSIBLE_BASE_MANAGED_ROLE_REGISTRY=${EDA_ANSIBLE_BASE_MANAGED_ROLE_REGISTRY:-@json {}}


services:
Expand Down
1 change: 1 addition & 0 deletions tools/docker/docker-compose-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ x-environment:
- EDA_RESOURCE_SERVER__SECRET_KEY=${EDA_RESOURCE_SERVER__SECRET_KEY}
- EDA_RESOURCE_SERVER__VALIDATE_HTTPS=${EDA_RESOURCE_SERVER__VALIDATE_HTTPS:-False}
- EDA_RESOURCE_JWT_USER_ID=${EDA_RESOURCE_JWT_USER_ID}
- EDA_ANSIBLE_BASE_MANAGED_ROLE_REGISTRY=${EDA_ANSIBLE_BASE_MANAGED_ROLE_REGISTRY:-@json {}}

services:
podman-pre-setup:
Expand Down

0 comments on commit 383e904

Please sign in to comment.