Upgrade to ansible 2.12 in an attempt to fix the deployment
This commit is contained in:
parent
fdd23ad00f
commit
c1b5a4d449
3 changed files with 10 additions and 6 deletions
10
.deploy.yml
10
.deploy.yml
|
@ -7,13 +7,13 @@
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
tasks:
|
tasks:
|
||||||
- name: Login to Gitlab Docker Registry
|
- name: Login to Gitlab Docker Registry
|
||||||
docker_login:
|
'community.docker.docker_login':
|
||||||
registry_url: "{{ lookup('env', 'CI_REGISTRY') }}"
|
registry_url: "{{ lookup('env', 'CI_REGISTRY') }}"
|
||||||
username: "{{ lookup('env', 'CI_REGISTRY_USER') }}"
|
username: "{{ lookup('env', 'CI_REGISTRY_USER') }}"
|
||||||
password: "{{ lookup('env', 'CI_REGISTRY_PASSWORD') }}"
|
password: "{{ lookup('env', 'CI_REGISTRY_PASSWORD') }}"
|
||||||
reauthorize: yes
|
reauthorize: yes
|
||||||
- name: Replace Prod Container
|
- name: Replace Prod Container
|
||||||
docker_container:
|
'community.docker.docker_container':
|
||||||
name: GeekbotProd
|
name: GeekbotProd
|
||||||
image: "{{ lookup('env', 'IMAGE_TAG') }}"
|
image: "{{ lookup('env', 'IMAGE_TAG') }}"
|
||||||
recreate: yes
|
recreate: yes
|
||||||
|
@ -33,6 +33,6 @@
|
||||||
GEEKBOT_SUMOLOGIC: "{{ lookup('env', 'GEEKBOT_SUMOLOCIG') }}"
|
GEEKBOT_SUMOLOGIC: "{{ lookup('env', 'GEEKBOT_SUMOLOCIG') }}"
|
||||||
GEEKBOT_SENTRY: "{{ lookup('env', 'GEEKBOT_SENTRY') }}"
|
GEEKBOT_SENTRY: "{{ lookup('env', 'GEEKBOT_SENTRY') }}"
|
||||||
GEEKBOT_DB_REDSHIFT_COMPAT: "true"
|
GEEKBOT_DB_REDSHIFT_COMPAT: "true"
|
||||||
# - name: Cleanup Old Container
|
- name: Cleanup Old Container
|
||||||
# docker_prune:
|
'community.docker.docker_prune':
|
||||||
# images: yes
|
images: yes
|
||||||
|
|
|
@ -34,7 +34,7 @@ Package:
|
||||||
|
|
||||||
Deploy:
|
Deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: runebaas/ansible-runner:v1.4.7
|
image: quay.io/ansible/ansible-runner:stable-2.12-latest
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
variables:
|
variables:
|
||||||
|
@ -46,6 +46,7 @@ Deploy:
|
||||||
- chmod -R 600 /root/.ssh
|
- chmod -R 600 /root/.ssh
|
||||||
- ssh-keyscan -p 65432 $PROD_IP > /root/.ssh/known_hosts
|
- ssh-keyscan -p 65432 $PROD_IP > /root/.ssh/known_hosts
|
||||||
script:
|
script:
|
||||||
|
- ansible-galaxy collection install -r ansible-requirements.yml
|
||||||
- ansible-playbook -i $PROD_IP, .deploy.yml
|
- ansible-playbook -i $PROD_IP, .deploy.yml
|
||||||
|
|
||||||
Sentry:
|
Sentry:
|
||||||
|
|
3
ansible-requirements.yml
Normal file
3
ansible-requirements.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
collections:
|
||||||
|
- name: community.docker
|
||||||
|
version: 2.7.0
|
Loading…
Reference in a new issue