Skip to content

Instantly share code, notes, and snippets.

@kozikow
Created February 7, 2019 01:41
Show Gist options
  • Save kozikow/5735b830c9b20bb2a2232a05d26ccdd6 to your computer and use it in GitHub Desktop.
Save kozikow/5735b830c9b20bb2a2232a05d26ccdd6 to your computer and use it in GitHub Desktop.
---
- name: "Delete kubernetes deployments"
k8s:
kubeconfig: "{{ kubeconfig }}"
state: absent
resource_definition: "{{ lookup('template', kubernetes_configs + '/' + item + '/deployment.yaml.jinja') | from_yaml }}"
with_items: "{{ kubernetes_deployments }}"
when: stage == "development"
- name: "Create kubernetes deployments"
k8s:
kubeconfig: "{{ kubeconfig }}"
state: present
resource_definition: "{{ lookup('template', kubernetes_configs + '/' + item + '/deployment.yaml.jinja') | from_yaml }}"
with_items: "{{ kubernetes_deployments }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment