Housekeeping (#435)

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: #435
This commit is contained in:
Michael Grote 2022-11-24 16:46:36 +01:00
parent 88a2d34183
commit b1ab442fbc
3 changed files with 0 additions and 82 deletions

View file

@ -1,79 +0,0 @@
stages:
- ping-test
- deploy-test
- ping-prod
- deploy-prod
ping-test:
image: quotengrote/gitlab-ci-ansible:latest
stage: ping-test
interruptible: true
before_script:
- chmod 0755 /builds/mg/ansible
- echo "$id_rsa_ansible_user" > /builds/mg/ansible/id_rsa_ansible_user
- chmod 0400 /builds/mg/ansible/id_rsa_ansible_user
script:
- ansible -i inventory --limit test --vault-password-file $ansible_vault_pass all -m ping
after_script:
- rm /builds/mg/ansible/id_rsa_ansible_user
rules:
- if: $CI_MERGE_REQUEST_ID
tags:
- ansible
ansible-deploy-test:
image: quotengrote/gitlab-ci-ansible:latest
stage: deploy-test
interruptible: false
before_script:
- chmod 0755 /builds/mg/ansible
- echo "$id_rsa_ansible_user" > /builds/mg/ansible/id_rsa_ansible_user
- chmod 0400 /builds/mg/ansible/id_rsa_ansible_user
script:
- ansible-playbook playbooks/base/0_master.yml playbooks/service/* -i inventory --limit test --vault-password-file $ansible_vault_pass
after_script:
- rm /builds/mg/ansible/id_rsa_ansible_user
rules:
- if: $CI_MERGE_REQUEST_ID
tags:
- ansible
ping-prod:
image: quotengrote/gitlab-ci-ansible:latest
stage: ping-prod
interruptible: true
before_script:
- chmod 0755 /builds/mg/ansible
- echo "$id_rsa_ansible_user" > /builds/mg/ansible/id_rsa_ansible_user
- chmod 0400 /builds/mg/ansible/id_rsa_ansible_user
script:
- ansible -i inventory --limit production --vault-password-file $ansible_vault_pass all -m ping
after_script:
- rm /builds/mg/ansible/id_rsa_ansible_user
rules:
- if: $CI_COMMIT_BRANCH == 'master'
tags:
- ansible
ansible-deploy-prod:
image: quotengrote/gitlab-ci-ansible:latest
stage: deploy-prod
interruptible: false
before_script:
- chmod 0755 /builds/mg/ansible
- echo "$id_rsa_ansible_user" > /builds/mg/ansible/id_rsa_ansible_user
- chmod 0400 /builds/mg/ansible/id_rsa_ansible_user
script:
- ansible-playbook playbooks/base/0_master.yml playbooks/service/* -i inventory --limit production --vault-password-file $ansible_vault_pass
after_script:
- rm /builds/mg/ansible/id_rsa_ansible_user
rules:
- if: $CI_COMMIT_BRANCH == 'master'
tags:
- ansible
# GitLab-CI-Vars
# $ansible_vault_pass - Type: File
# $id_rsa_ansible_user - Type: Variable

View file

@ -1,6 +1,4 @@
# ansible_heimserver # ansible_heimserver
[![Build Status](http://docker10.grote.lan/api/badges/mg/ansible/status.svg)](http://docker10.grote.lan/mg/ansible)
## example-cli ## example-cli
`ansible-playbook playbooks/base/0_master.yml -i inventory --key-file id_rsa_ansible_user --vault-password-file vault-pass.yml --limit jenkins-test.grote.lan` `ansible-playbook playbooks/base/0_master.yml -i inventory --key-file id_rsa_ansible_user --vault-password-file vault-pass.yml --limit jenkins-test.grote.lan`

View file

@ -169,7 +169,6 @@
recursive: 'no' recursive: 'no'
snapshots: true snapshots: true
template: '3tage' template: '3tage'
template: '3tage'
- path: rpool/data/k3s - path: rpool/data/k3s
recursive: 'no' recursive: 'no'
snapshots: true snapshots: true