# flake8: noqa
# pylint: skip-file

DOCUMENTATION = '''
---
module: oc_process
short_description: Module to process openshift templates
description:
  - Process openshift templates programmatically.
options:
  state:
    description:
    - State has a few different meanings when it comes to process.
    - present - This state runs an `oc process <template>`.  When used in
    - conjunction with 'create: True' the process will be piped to | oc create -f
    - absent - will remove a template
    - list - will perform an `oc get template <template_name>`
    default: present
    choices: ["present", "absent", "list"]
    aliases: []
  kubeconfig:
    description:
    - The path for the kubeconfig file to use for authentication
    required: false
    default: /etc/origin/master/admin.kubeconfig
    aliases: []
  debug:
    description:
    - Turn on debug output.
    required: false
    default: False
    aliases: []
  template_name:
    description:
    - Name of the openshift template that is being processed.
    required: false
    default: None
    aliases: []
  namespace:
    description:
    - The namespace where the template lives.
    required: false
    default: default
    aliases: []
  content:
    description:
    - Template content that will be processed.
    required: false
    default: None
    aliases: []
  params:
    description:
    - A list of parameters that will be inserted into the template.
    required: false
    default: None
    aliases: []
  create:
    description:
    - Whether or not to create the template after being processed. e.g.  oc process | oc create -f -
    required: False
    default: False
    aliases: []
  reconcile:
    description:
    - Whether or not to attempt to determine if there are updates or changes in the incoming template.
    default: true
    aliases: []
author:
- "Kenny Woodson <kwoodson@redhat.com>"
extends_documentation_fragment: []
'''

EXAMPLES = '''
- name: process the cloud volume provisioner template with variables
  oc_process:
    namespace: openshift-infra
    template_name: online-volume-provisioner
    create: True
    params:
      PLAT: rhel7
  register: processout
  run_once: true
- debug: var=processout
'''
