Skip to content
Snippets Groups Projects
Commit 170d9647 authored by Nathan Rodet's avatar Nathan Rodet
Browse files

updated scripts

parent 275d9143
No related branches found
No related tags found
No related merge requests found
Pipeline #78846 failed
......@@ -20,34 +20,35 @@ before_script:
stages:
- prepare
- validate
- build
- deploy
- destroy
ssh_key:
sshkey:
stage: prepare
script:
- ssh-keygen -b 2048 -t rsa -f /tmp/sshkey -q -N ""
- ls /tmp
ansible_hosts_file:
ansible-hosts-file:
stage: prepare
script:
- mv ~/bash.bash_logout badfile
- ls
- chmod +x ./${SCRIPTS_ROOT}/build-ansible-hosts.sh
- ./${SCRIPTS_ROOT}/build-ansible-hosts.sh
init:
terraform-init:
stage: prepare
script:
- gitlab-terraform init
validate:
stage: validate
terraform-validate:
stage: prepare
script:
- gitlab-terraform validate
plan:
terraform-plan:
stage: build
script:
- gitlab-terraform plan
......@@ -59,7 +60,7 @@ plan:
reports:
terraform: ${TF_ROOT}/plan.json
apply:
terraform-apply:
stage: deploy
environment:
name: ${ENVIRONMENT}
......@@ -68,12 +69,12 @@ apply:
dependencies:
- plan
ansible:
ansible-playbook:
stage: deploy
script:
- ansible-playbook -i ${ANSIBLE_ROOT}/tasks/update.yaml
destroy:
terraform-destroy:
stage: destroy
environment:
name: ${ENVIRONMENT}
......
instances:
hosts:
dev-0.cma.alpha.grandlyon.com:
dev-1.cma.alpha.grandlyon.com:
dev-2.cma.alpha.grandlyon.com:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment