Kostiantyn Kalynovskyi 16af49c265 Roles to genreate base config and build airshipctl
These roles will allow to generate base airship and kubeconfigs

Change-Id: I8e93dbeaf1aef2f51db5ed9e807f58999ebe97f7
2020-02-05 20:59:20 +00:00

31 lines
796 B
YAML

- name: set airshipctl config directory
set_fact:
airshipctl_config_dir: "{{ ansible_env.HOME }}/.airship"
- name: Ensure airshipctl directory exists
file:
state: directory
path: "{{ airshipctl_config_dir }}"
mode: "0700"
- name: generate airshipctl config file
template:
src: "airshipconfig.j2"
dest: "{{ airshipctl_config_dir }}/config"
- name: generate kubeconfig
template:
src: "kubeconfig.j2"
dest: "{{ airshipctl_config_dir }}/kubeconfig"
- name: verify airshipctl config is working
block:
- name: verify cluster is set
command: airshipctl config get-cluster
register: airshipctl_cluster
- name: assert that cluster is correct
assert:
that:
- "'dummycluster_ephemeral' in airshipctl_cluster.stdout"