main.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ---
  2. - name: Install openshift-sdn-node
  3. yum:
  4. pkg: openshift-sdn-node
  5. state: installed
  6. # TODO: we are specifying -hostname= for OPTIONS as a workaround for
  7. # openshift-sdn-node not properly detecting the hostname.
  8. - name: Configure openshift-sdn-node settings
  9. lineinfile:
  10. dest: /etc/sysconfig/openshift-sdn-node
  11. regexp: "{{ item.regex }}"
  12. line: "{{ item.line }}"
  13. backrefs: yes
  14. with_items:
  15. - regex: '^(OPTIONS=)'
  16. line: '\1"-v={{ openshift_sdn_node_debug_level }} -hostname={{ openshift_bind_ip if openshift_hostname_workaround else ansible_fqdn }}"'
  17. - regex: '^(MASTER_URL=)'
  18. line: '\1"http://{{ openshift_master_ips | first }}:4001"'
  19. - regex: '^(MINION_IP=)'
  20. line: '\1"{{ openshift_public_ip }}"'
  21. # TODO lock down the insecure-registry config to a more sane value than
  22. # 0.0.0.0/0
  23. - regex: '^(DOCKER_OPTIONS=)'
  24. line: '\1"--insecure-registry=0.0.0.0/0 -b=lbr0 --mtu=1450 --selinux-enabled"'
  25. notify: restart openshift-sdn-node
  26. - name: Set openshift-sdn-master facts
  27. include: "{{ role_path | dirname }}/openshift_common/tasks/set_facts.yml"
  28. facts:
  29. - section: sdn-master
  30. option: debug_level
  31. value: "{{ openshift_sdn_master_debug_level }}"
  32. # fixme: Once the openshift_cluster playbook is published state should be started
  33. # Always bounce service to pick up new credentials
  34. - name: Start and enable openshift-sdn-node
  35. service:
  36. name: openshift-sdn-node
  37. enabled: yes
  38. state: restarted