main.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ---
  2. # TODO: add task to set the sdn subnet if openshift-sdn-master hasn't been
  3. # started yet
  4. - name: Set master sdn OpenShift facts
  5. openshift_facts:
  6. role: 'master_sdn'
  7. local_facts:
  8. debug_level: "{{ openshift_master_sdn_debug_level | default(openshift.common.debug_level) }}"
  9. - name: Install openshift-sdn-master
  10. yum:
  11. pkg: openshift-sdn-master
  12. state: installed
  13. register: install_result
  14. - name: Reload systemd units
  15. command: systemctl daemon-reload
  16. when: install_result | changed
  17. # TODO: we should probably generate certs specifically for sdn
  18. - name: Configure openshift-sdn-master settings
  19. lineinfile:
  20. dest: /etc/sysconfig/openshift-sdn-master
  21. regexp: '^OPTIONS='
  22. line: "OPTIONS=\"-v={{ openshift.master_sdn.debug_level }} -etcd-endpoints={{ openshift_sdn_master_url}}
  23. -etcd-cafile={{ openshift_master_config_dir }}/ca.crt
  24. -etcd-certfile={{ openshift_master_config_dir }}/master.etcd-client.crt
  25. -etcd-keyfile={{ openshift_master_config_dir }}/master.etcd-client.key\""
  26. notify:
  27. - restart openshift-sdn-master
  28. - name: Enable openshift-sdn-master
  29. service:
  30. name: openshift-sdn-master
  31. enabled: yes
  32. state: started