destroy cluster and rename terraform to create-cluster
This commit is contained in:
parent
bbb3e03651
commit
a30ab86b4f
@ -12,10 +12,6 @@
|
||||
dest: "{{ project_terraform }}/main.tf"
|
||||
|
||||
|
||||
- name: display plan terraform
|
||||
debug:
|
||||
var: output
|
||||
|
||||
- name: Create cluster scaleway
|
||||
community.general.terraform:
|
||||
project_path: '{{ project_terraform }}'
|
13
scaleway-k8s/tasks/destroy-cluster.yml
Normal file
13
scaleway-k8s/tasks/destroy-cluster.yml
Normal file
@ -0,0 +1,13 @@
|
||||
- name: "Destroy cluster via terraform"
|
||||
community.general.terraform:
|
||||
project_path: '{{ project_terraform }}'
|
||||
state: absent
|
||||
environment:
|
||||
SCW_ACCESS_KEY: "{{ scw_access_key }}"
|
||||
SCW_SECRET_KEY: "{{ scw_secret_key }}"
|
||||
register: output
|
||||
|
||||
- name: Remove directory
|
||||
file:
|
||||
path: '{{ project_terraform }}'
|
||||
state: absent
|
@ -1,7 +1,11 @@
|
||||
- name: Create cluster k8s scaleway via terraform
|
||||
ansible.builtin.import_tasks: terraform.yml
|
||||
ansible.builtin.import_tasks: create-cluster.yml
|
||||
tags: ["create-cluster"]
|
||||
|
||||
- name: Get id Cluster
|
||||
ansible.builtin.import_tasks: k8s.yml
|
||||
tags: ["create-cluster", "api"]
|
||||
tags: ["create-cluster", "api"]
|
||||
|
||||
- name: Destroy cluster k8s scaleway via terraform
|
||||
ansible.builtin.import_tasks: destroy-cluster.yml
|
||||
tags: ["destroy-cluster"]
|
Loading…
x
Reference in New Issue
Block a user