From 8dc7dba7d447a2f25d14ecd72cc5059354133c4a Mon Sep 17 00:00:00 2001 From: Igor Sudak Date: Tue, 9 Apr 2024 12:51:46 +0000 Subject: [PATCH] Remove venv activation when running commands in the web_server container --- roles/dev_deploy/tasks/misc.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/dev_deploy/tasks/misc.yml b/roles/dev_deploy/tasks/misc.yml index 5336d8e..ae5286c 100644 --- a/roles/dev_deploy/tasks/misc.yml +++ b/roles/dev_deploy/tasks/misc.yml @@ -47,13 +47,13 @@ - name: Bootstrap permissions community.docker.docker_container_exec: container: "{{ container_name_prefix }}_web_server_1" - command: "bash -c 'source env/bin/activate && chmod +x scripts/bootstrap_permissions.py && python3 scripts/bootstrap_permissions.py || true'" + command: bash -c 'python3 scripts/bootstrap_permissions.py || true' when: is_clean_installation.stat.exists == False - name: Bootstrap repositories community.docker.docker_container_exec: container: "{{ container_name_prefix }}_web_server_1" - command: "bash -c 'source env/bin/activate && chmod +x scripts/bootstrap_repositories.py && python3 scripts/bootstrap_repositories.py -c reference_data/platforms.yaml'" + command: python3 scripts/bootstrap_repositories.py -c reference_data/platforms.yaml register: result until: result is succeeded retries: 10 @@ -63,7 +63,7 @@ - name: Activate user community.docker.docker_container_exec: container: "{{ container_name_prefix }}_web_server_1" - command: "bash -c 'source env/bin/activate && chmod +x scripts/manage_users.py && python3 scripts/manage_users.py -e base_user@almalinux.org -t AlmaLinux_team --verify --superuser || true'" + command: bash -c 'python3 scripts/manage_users.py -e base_user@almalinux.org -t AlmaLinux_team --verify --superuser || true' when: is_clean_installation.stat.exists == False - name: Checking if GPG key exists on web_server @@ -102,7 +102,7 @@ - name: Bootstrap flavours community.docker.docker_container_exec: container: "{{ container_name_prefix }}_web_server_1" - command: "bash -c 'source env/bin/activate && chmod +x scripts/manage_flavours.py && python3 scripts/manage_flavours.py -c reference_data/platform_flavors.yaml'" + command: python3 scripts/manage_flavours.py -c reference_data/platform_flavors.yaml when: is_clean_installation.stat.exists == False - name: ensure file exists