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

Fix Ansible scripts to work with production deployment #403

Merged
merged 5 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading