#!/usr/bin/ansible-playbook --module-path=../../../library/
# ./oc_adm_csr.yml -M ../../../library -e "cli_master_test=$OPENSHIFT_MASTER
---
- hosts: "{{ cli_master_test }}"
  gather_facts: no

  tasks:
  - name: list csrs
    oc_adm_csr:
      state: list
    register: csrout

  - debug: var=csrout

  - name: list csrs
    oc_adm_csr:
      state: approve
      nodes:
      - ip-172-31-51-0-ec2-internal
      - ip-172-31-51-246-ec2-internal
      - ip-172-31-54-12-ec2-internal
      - ip-172-31-58-173-ec2-internal
      - ip-172-31-58-212-ec2-internal
      - ip-172-31-51-246-ec2-internal
      - ip-172-31-54-12-ec2-internal

    register: csrout
  - debug: var=csrout
