bootstrap_config.yml 755 B

123456789101112131415161718192021
  1. ---
  2. - name: Ensure required directories are present
  3. file:
  4. path: "{{ item }}"
  5. owner: root
  6. group: root
  7. mode: 0755
  8. state: directory
  9. with_items:
  10. - /etc/origin/node/pods
  11. - /etc/origin/node/certificates
  12. - name: Determine if node already has a dynamic config group
  13. command: grep -E '^BOOTSTRAP_CONFIG_NAME=.+' "/etc/sysconfig/{{ openshift_service_type }}-node"
  14. ignore_errors: true
  15. register: existing
  16. - name: Update the sysconfig to group "{{ r_node_dynamic_config_name }}"
  17. lineinfile:
  18. dest: "/etc/sysconfig/{{ openshift_service_type }}-node"
  19. line: "BOOTSTRAP_CONFIG_NAME={{ r_node_dynamic_config_name }}"
  20. regexp: "^BOOTSTRAP_CONFIG_NAME=.*"
  21. when: r_node_dynamic_config_force|default(False) or existing is failed