Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Fix Ansible scripts to work with production deployment (#403)
Browse files Browse the repository at this point in the history
* Update inventory.yaml

* Update deployment.yaml

* Update deploy-testing.yaml

* Update deploy-production.yaml

* Update deployment.yaml
  • Loading branch information
klaus993 authored Jan 12, 2024
1 parent 4ecc569 commit 9c4df34
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
PROVER_STORAGE: ${{ vars.PROVER_STORAGE }}
ANSIBLE_SSH_PKEY_DIR: "./id_ed25519_production"
TS_HOST: ${{ vars.SSH_HOST }}
TS_USER: ${{ vars.TS_USER }}
GIT_BRANCH: ${{ github.head_ref || github.ref_name }}
ANSIBLE_STDOUT_CALLBACK: "yaml"
NEWRELIC_KEY: ${{ secrets.NEWRELIC_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
PROVER_STORAGE: ${{ vars.PROVER_STORAGE }}
ANSIBLE_SSH_PKEY_DIR: "~/.ssh/id_ed25519"
TS_HOST: ${{ vars.TS_HOST }}
TS_USER: ${{ vars.TS_USER }}
GIT_BRANCH: ${{ github.head_ref || github.ref_name }}
ANSIBLE_STDOUT_CALLBACK: "yaml"
ENABLE_MAINNET_SYNC: "true"
Expand Down
2 changes: 1 addition & 1 deletion ansible/inventory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ webservers:
hosts:
starknet_testing:
ansible_host: "{{ lookup('ansible.builtin.env', 'TS_HOST') }}"
ansible_user: dev
ansible_user: "{{ lookup('ansible.builtin.env', 'TS_USER') }}"
ansible_python_interpreter: /usr/bin/python3
ansible_ssh_private_key_file: "{{ lookup('ansible.builtin.env', 'ANSIBLE_SSH_PKEY_DIR') }}"
4 changes: 2 additions & 2 deletions ansible/playbooks/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
gather_facts: false
any_errors_fatal: true
become: true
become_user: dev
become_user: "{{ lookup('ansible.builtin.env', 'TS_USER') }}"

pre_tasks:

- name: Delete tmp repo
file:
state: absent
path: /home/dev/tmp/stark_compass_explorer
path: "/home/{{ lookup('ansible.builtin.env', 'TS_USER') }}/tmp/stark_compass_explorer"

- name: Clone repo in tmp dir
ansible.builtin.git:
Expand Down

0 comments on commit 9c4df34

Please sign in to comment.