diff --git a/util/ansible/deploy.yml b/util/ansible/deploy.yml index 5bc11df..69adceb 100644 --- a/util/ansible/deploy.yml +++ b/util/ansible/deploy.yml @@ -2,6 +2,8 @@ - name: Update web servers hosts: ec2 gather_facts: false + environment: + backend_port: 80 roles: - configure-server - deploy-artifact \ No newline at end of file diff --git a/util/ansible/roles/configure-server/tasks/main.yml b/util/ansible/roles/configure-server/tasks/main.yml index 1eaef1d..b264314 100644 --- a/util/ansible/roles/configure-server/tasks/main.yml +++ b/util/ansible/roles/configure-server/tasks/main.yml @@ -25,7 +25,4 @@ dest: "/etc/environment" state: present regexp: "^PORT=" - line: "PORT=80" - -- name: Source the environment file - shell: "source /etc/environment" \ No newline at end of file + line: "PORT={{ backend_port }}"