Created
March 26, 2019 05:50
-
-
Save zahodi/e13fde5d4f5df78d9ed066605d502882 to your computer and use it in GitHub Desktop.
ansible tasks to deploy your app stack to k8s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: use the venv python to ensure all dependencies are satisfied | |
set_fact: | |
ansible_python_interpreter: '{{ ansible_playbook_python }}' | |
- name: Create Namespaces | |
k8s: | |
kubeconfig: ~/.kube/config | |
state: present | |
definition: | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: "{{ item }}" | |
loop: "{{ eks_namespaces }}" | |
- name: Ensure k8s secrets | |
k8s: | |
kubeconfig: ~/.kube/config | |
state: present | |
definition: "{{ item }}" | |
loop: "{{ k8s_secrets }}" | |
no_log: true | |
- name: Create an ingress controller | |
k8s: | |
kubeconfig: ~/.kube/config | |
state: present | |
definition: "{{ ingress_controller }}" | |
- name: Ensure persistentVolumeClaim | |
k8s: | |
kubeconfig: ~/.kube/config | |
state: present | |
definition: "{{ item }}" | |
loop: "{{ pvc_defintions }}" | |
- name: Ensure Deployment definitions | |
k8s: | |
kubeconfig: ~/.kube/config | |
state: present | |
definition: "{{ item }}" | |
loop: "{{ deployment_defintions }}" | |
- name: Ensure service definitions | |
k8s: | |
kubeconfig: ~/.kube/config | |
state: present | |
definition: "{{ item }}" | |
loop: "{{ service_definitions }}" | |
- name: Ensure ingress definitions | |
k8s: | |
kubeconfig: ~/.kube/config | |
state: present | |
definition: "{{ item }}" | |
loop: "{{ ingress_defintions }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment