diff --git a/deployment/ansible/playbooks/deploy-application-code.yml b/deployment/ansible/playbooks/deploy-application-code.yml index ffe2609c..7ef740a2 100644 --- a/deployment/ansible/playbooks/deploy-application-code.yml +++ b/deployment/ansible/playbooks/deploy-application-code.yml @@ -7,7 +7,6 @@ vars: application_code_dest: "/home/deploy/michaelschiemer/current" git_repository_url_default: "https://git.michaelschiemer.de/michael/michaelschiemer.git" - git_repository_url: "{{ git_repository_url | default(git_repository_url_default) }}" # Determine branch based on environment git_branch: >- {%- if deployment_environment == 'staging' -%} @@ -20,6 +19,10 @@ deployment_environment: "{{ deployment_environment | default('production') }}" tasks: + - name: Set git_repository_url if not provided + set_fact: + git_repository_url: "{{ git_repository_url | default(git_repository_url_default) }}" + - name: Ensure Git is installed ansible.builtin.apt: name: git