diff --git a/src/aap_eda/settings/default.py b/src/aap_eda/settings/default.py index 6a02b88cf..1ce9c5f00 100644 --- a/src/aap_eda/settings/default.py +++ b/src/aap_eda/settings/default.py @@ -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 @@ -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( diff --git a/tools/docker/docker-compose-dev-redis-tls.yaml b/tools/docker/docker-compose-dev-redis-tls.yaml index c1a281e29..79e6c296c 100644 --- a/tools/docker/docker-compose-dev-redis-tls.yaml +++ b/tools/docker/docker-compose-dev-redis-tls.yaml @@ -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: diff --git a/tools/docker/docker-compose-dev.yaml b/tools/docker/docker-compose-dev.yaml index bc22f4808..953d0c0f1 100644 --- a/tools/docker/docker-compose-dev.yaml +++ b/tools/docker/docker-compose-dev.yaml @@ -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: diff --git a/tools/docker/docker-compose-mac.yml b/tools/docker/docker-compose-mac.yml index 77d7eb5e6..84372ab61 100644 --- a/tools/docker/docker-compose-mac.yml +++ b/tools/docker/docker-compose-mac.yml @@ -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: diff --git a/tools/docker/docker-compose-stage.yaml b/tools/docker/docker-compose-stage.yaml index 09d661ea7..6717431dc 100644 --- a/tools/docker/docker-compose-stage.yaml +++ b/tools/docker/docker-compose-stage.yaml @@ -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: