28 lines
595 B
YAML
Raw Permalink Normal View History

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