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
|
||||
tasks:
|
||||
- name: Login to Gitlab Docker Registry
|
||||
docker_login:
|
||||
'community.docker.docker_login':
|
||||
registry_url: "{{ lookup('env', 'CI_REGISTRY') }}"
|
||||
username: "{{ lookup('env', 'CI_REGISTRY_USER') }}"
|
||||
password: "{{ lookup('env', 'CI_REGISTRY_PASSWORD') }}"
|
||||
reauthorize: yes
|
||||
- name: Replace Prod Container
|
||||
docker_container:
|
||||
'community.docker.docker_container':
|
||||
name: GeekbotProd
|
||||
image: "{{ lookup('env', 'IMAGE_TAG') }}"
|
||||
recreate: yes
|
||||
|
@ -33,6 +33,6 @@
|
|||
GEEKBOT_SUMOLOGIC: "{{ lookup('env', 'GEEKBOT_SUMOLOCIG') }}"
|
||||
GEEKBOT_SENTRY: "{{ lookup('env', 'GEEKBOT_SENTRY') }}"
|
||||
GEEKBOT_DB_REDSHIFT_COMPAT: "true"
|
||||
# - name: Cleanup Old Container
|
||||
# docker_prune:
|
||||
# images: yes
|
||||
- name: Cleanup Old Container
|
||||
'community.docker.docker_prune':
|
||||
images: yes
|
||||
|
|
|
@ -34,7 +34,7 @@ Package:
|
|||
|
||||
Deploy:
|
||||
stage: deploy
|
||||
image: runebaas/ansible-runner:v1.4.7
|
||||
image: quay.io/ansible/ansible-runner:stable-2.12-latest
|
||||
only:
|
||||
- master
|
||||
variables:
|
||||
|
@ -46,6 +46,7 @@ Deploy:
|
|||
- chmod -R 600 /root/.ssh
|
||||
- ssh-keyscan -p 65432 $PROD_IP > /root/.ssh/known_hosts
|
||||
script:
|
||||
- ansible-galaxy collection install -r ansible-requirements.yml
|
||||
- ansible-playbook -i $PROD_IP, .deploy.yml
|
||||
|
||||
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