Skip to content

Commit

Permalink
ok delete an recreate
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Nov 6, 2023
1 parent 60df010 commit ac908cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 2 additions & 6 deletions configure-route53.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
ttl: 60
value: "{{ item.dest }}"
wait: true
overwrite: true
loop:
- domain: "{{ hostvars['servicesnode']['hostname'] }}"
dest: "{{ hostvars['servicesnode']['ansible_host'] }}"
Expand Down Expand Up @@ -51,13 +50,10 @@
record: "{{ item.domain }}.data.nesi.org.nz"
type: A
ttl: 60
value: "{{ item.dest }}"
wait: true
loop:
- domain: "{{ hostvars['servicesnode']['hostname'] }}"
dest: "{{ hostvars['servicesnode']['ansible_host'] }}"
- domain: "{{ hostvars['webnode']['hostname'] }}"
dest: "{{ hostvars['webnode']['ansible_host'] }}"
- domain: "{{ terraform_workspace }}-ood-services"
- domain: "{{ terraform_workspace }}-ood-webnode"
when: (operation == "destroy")
ignore_errors: true

Expand Down
8 changes: 4 additions & 4 deletions deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

case $1 in
"destroy")
# ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i host.ini destroy-k8s-cluster.yml \
# -u ${TF_VAR_vm_user} --key-file '${TF_VAR_key_file}' -e operation=destroy -e terraform_workspace=${2:-default} || true
# ansible-playbook -i host.ini configure-route53.yml -e operation=destroy -e terraform_workspace=${2:-default}
# ansible-playbook setup-infra.yml -e operation=destroy -e terraform_workspace=${2:-default}
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i host.ini destroy-k8s-cluster.yml \
-u ${TF_VAR_vm_user} --key-file '${TF_VAR_key_file}' -e operation=destroy -e terraform_workspace=${2:-default} || true
ansible-playbook configure-route53.yml -e operation=destroy -e terraform_workspace=${2:-default}
ansible-playbook setup-infra.yml -e operation=destroy -e terraform_workspace=${2:-default}
;;
"create")
ansible-playbook setup-infra.yml -e operation=create -e terraform_workspace=${2:-default}
Expand Down

0 comments on commit ac908cd

Please sign in to comment.