# flake8: noqa
# pylint: skip-file

DOCUMENTATION = '''
---
module: oc_adm_policy_user
short_description: Module to manage openshift policy for users
description:
  - Manage openshift policy for users.
options:
  kubeconfig:
    description:
    - The path for the kubeconfig file to use for authentication
    required: false
    default: /etc/origin/master/admin.kubeconfig
    aliases: []
  namespace:
    description:
    - The namespace scope
    required: false
    default: None
    aliases: []
  role_namespace:
    description:
    - The namespace where to find the role
    required: false
    default: None
    aliases: []
  debug:
    description:
    - Turn on debug output.
    required: false
    default: False
    aliases: []
  user:
    description:
    - The name of the user
    required: true
    default: None
    aliases: []
  resource_kind:
    description:
    - The kind of policy to affect
    required: true
    default: None
    choices: ["role", "cluster-role", "scc"]
    aliases: []
  resource_name:
    description:
    - The name of the policy
    required: true
    default: None
    aliases: []
  state:
    description:
    - Desired state of the policy
    required: true
    default: present
    choices: ["present", "absent"]
    aliases: []
author:
- "Kenny Woodson <kwoodson@redhat.com>"
extends_documentation_fragment: []
'''

EXAMPLES = '''
- name: oc adm policy remove-scc-from-user an-scc ausername
  oc_adm_policy_user:
    user: ausername
    resource_kind: scc
    resource_name: an-scc
    state: absent

- name: oc adm policy add-cluster-role-to-user system:build-strategy-docker ausername
  oc_adm_policy_user:
    user: ausername
    resource_kind: cluster-role
    resource_name: system:build-strategy-docker
    state: present

- name: oc adm policy add-role-to-user system:build-strategy-docker ausername --role-namespace foo
  oc_adm_policy_user:
    user: ausername
    resource_kind: cluster-role
    resource_name: system:build-strategy-docker
    state: present
    role_namespace: foo
'''
