37 lines
758 B
YAML
37 lines
758 B
YAML
|
---
|
||
|
# tasks file for scaleway-k8s
|
||
|
|
||
|
- name: Create directory terraform
|
||
|
file:
|
||
|
path: /home/valentin/terraform
|
||
|
state: directory
|
||
|
|
||
|
- name: Copy main.tf
|
||
|
template:
|
||
|
src: main.tf.j2
|
||
|
dest: /home/valentin/terraform/main.tf
|
||
|
|
||
|
- name: Plan terraform
|
||
|
community.general.terraform:
|
||
|
project_path: '{{ project_terraform }}'
|
||
|
state: planned
|
||
|
register: output
|
||
|
environment:
|
||
|
SCW_ACCESS_KEY: "{{ scw_access_key }}"
|
||
|
SCW_SECRET_KEY: "{{ scw_secret_key }}"
|
||
|
|
||
|
|
||
|
- name: display plan terraform
|
||
|
debug:
|
||
|
var: output
|
||
|
|
||
|
- name: Create cluster scaleway
|
||
|
community.general.terraform:
|
||
|
project_path: '{{ project_terraform }}'
|
||
|
state: present
|
||
|
environment:
|
||
|
SCW_ACCESS_KEY: "{{ scw_access_key }}"
|
||
|
SCW_SECRET_KEY: "{{ scw_secret_key }}"
|
||
|
|
||
|
|