28 lines
595 B
YAML
28 lines
595 B
YAML
|
---
|
||
|
# 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
|
||
|
|