main.yml 699 B

12345678910111213141516171819202122232425262728
  1. ---
  2. - name: Copy auto-approver config to host
  3. run_once: true
  4. copy:
  5. src: "{{ item }}"
  6. dest: /tmp/openshift-approver/
  7. owner: root
  8. mode: 0400
  9. with_fileglob:
  10. - "*.yaml"
  11. - name: Set auto-approver nodeSelector
  12. run_once: true
  13. yedit:
  14. src: "/tmp/openshift-approver/openshift-bootstrap-controller.yaml"
  15. key: spec.template.spec.nodeSelector
  16. value: "{{ openshift_master_bootstrap_auto_approver_node_selector | default({}) }}"
  17. value_type: list
  18. - name: Create auto-approver on cluster
  19. run_once: true
  20. command: oc apply -f /tmp/openshift-approver/
  21. - name: Remove auto-approver config
  22. run_once: true
  23. file:
  24. path: /tmp/openshift-approver/
  25. state: absent