33 lines
633 B
YAML
Raw Normal View History

2022-10-20 16:47:03 +02:00
---
# tasks file for scaleway-k8s
- name: Create directory {{ project_terraform }}
2022-10-20 16:47:03 +02:00
file:
path: "{{ project_terraform }}"
2022-10-20 16:47:03 +02:00
state: directory
- name: Copy main.tf
template:
src: main.tf.j2
dest: "{{ project_terraform }}/main.tf"
2022-10-20 16:47:03 +02:00
- name: display plan terraform
debug:
var: output
- name: Create cluster scaleway
community.general.terraform:
project_path: '{{ project_terraform }}'
state: present
force_init: yes
2022-10-20 16:47:03 +02:00
environment:
SCW_ACCESS_KEY: "{{ scw_access_key }}"
SCW_SECRET_KEY: "{{ scw_secret_key }}"
register: output
2022-10-20 16:47:03 +02:00
- name: display terraform result
debug:
var: output
2022-10-20 16:47:03 +02:00