28 lines
857 B
YAML
28 lines
857 B
YAML
- hosts: localhost
|
|
connection: local
|
|
pre_tasks:
|
|
- name: Check docker is working
|
|
shell: docker info
|
|
register: docker_info
|
|
changed_when: "docker_info.rc != 0"
|
|
failed_when: "docker_info.rc != 0"
|
|
- name: Check Helm installed
|
|
shell: helm version
|
|
register: helm_version
|
|
changed_when: "helm_version.rc != 0"
|
|
failed_when: "helm_version.rc != 0"
|
|
- name: Helm version
|
|
debug:
|
|
msg: "{{ helm_version.stdout }}"
|
|
- name: Check kubectl installed and have access to cluster
|
|
shell: kubectl get nodes
|
|
register: kubectl_cluster_nodes
|
|
changed_when: "kubectl_cluster_nodes.rc != 0"
|
|
failed_when: "kubectl_cluster_nodes.rc != 0"
|
|
- name: Kubectl nodes output
|
|
debug:
|
|
msg: "{{ kubectl_cluster_nodes.stdout.split('\n') }}"
|
|
roles:
|
|
- helm-repos
|
|
- pwgen
|