Skip to content

Instantly share code, notes, and snippets.

@consolewitch
Last active May 18, 2018 18:37
Show Gist options
  • Select an option

  • Save consolewitch/fee7ccc9b4809b6dc3a8a80ad0adc9ad to your computer and use it in GitHub Desktop.

Select an option

Save consolewitch/fee7ccc9b4809b6dc3a8a80ad0adc9ad to your computer and use it in GitHub Desktop.

Revisions

  1. consolewitch revised this gist May 18, 2018. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions deploy_k8s_manifests.yaml
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,14 @@
    # the python library that ansible uses to call kubernetes isn't up to date. See the following link for details
    # https://github.com/ansible/ansible/issues/36676#event-1510125400

    #- name: "install requirements for ansible k8s_raw module"
    # pip:
    # name: "{{ item.name }}"
    # version: "{{ item.version }}"
    # state: present with_items:
    # - { name: "openshift", version: "0.5.0" }
    # - { name: "pyyaml", version: "3.12" }
    #
    #- name: "Get a list of the jinja2 templates"
    # delegate_to: 127.0.0.1
    # become: false
  2. consolewitch created this gist May 18, 2018.
    45 changes: 45 additions & 0 deletions deploy_k8s_manifests.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    # This is *a* way to deploy kubernetes manifests with ansible but it doesn't currently work very well..
    # the python library that ansible uses to call kubernetes isn't up to date. See the following link for details
    # https://github.com/ansible/ansible/issues/36676#event-1510125400

    #- name: "Get a list of the jinja2 templates"
    # delegate_to: 127.0.0.1
    # become: false
    # find:
    # paths: "{{ role_path }}/templates/"
    # patterns: '*.j2'
    # register: kubernetes_manifest_templates
    #
    #- name: "Install the manifests"
    # template:
    # src: "{{ item.path }}"
    # dest: /opt/manifests/{{ item.path | basename | regex_replace('\.j2','') }}
    # loop: "{{ kubernetes_manifest_templates.files }}"
    #
    #- name: "Get a list of the kubernetes service manifests on the target"
    # find:
    # paths: "/opt/manifests/"
    # use_regex: true
    # patterns: '^service-.*(\.yaml|\.yml)$'
    # register: kubernetes_service_manifests
    #
    #- name: "Install kubernetes service manifests"
    # k8s_raw:
    # state: present
    # kubeconfig: "/home/user/.kube/config" ## this needs to be parameterized
    # src: "{{ item.path }}"
    # loop: "{{ kubernetes_service_manifests.files }}"
    #
    #- name: "Get a list of the kubernetes deployment manifests on the target"
    # find:
    # paths: "/opt/manifests/"
    # use_regex: true
    # patterns: '^deployment-.*(\.yaml|\.yml)$'
    # register: kubernetes_deployment_manifests
    #
    #- name: "Install kubernetes deployment manifests"
    # k8s_raw:
    # state: present
    # kubeconfig: "/home/user/.kube/config" ## this needs to be parameterized
    # src: "{{ item.path }}"
    # loop: "{{ kubernetes_deployment_manifests.files }}"