123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- ---
- # TODO: allow for overriding default ports where possible
- - name: Set node OpenShift facts
- openshift_facts:
- role: "{{ item.role }}"
- local_facts: "{{ item.local_facts }}"
- with_items:
- - role: common
- local_facts:
- hostname: "{{ openshift_hostname | default(none) }}"
- public_hostname: "{{ openshift_public_hostname | default(none) }}"
- deployment_type: "{{ openshift_deployment_type }}"
- - role: node
- local_facts:
- resources_cpu: "{{ openshift_node_resources_cpu | default(none) }}"
- resources_memory: "{{ openshift_node_resources_memory | default(none) }}"
- pod_cidr: "{{ openshift_node_pod_cidr | default(none) }}"
- labels: "{{ openshift_node_labels | default(none) }}"
- annotations: "{{ openshift_node_annotations | default(none) }}"
- registry_url: "{{ oreg_url | default(none) }}"
- debug_level: "{{ openshift_node_debug_level | default(openshift.common.debug_level) }}"
- - name: Install OpenShift Node package
- yum: pkg=openshift-node state=installed
- register: node_install_result
- - name: Install openshift-sdn-ovs
- yum: pkg=openshift-sdn-ovs state=installed
- register: sdn_install_result
- when: openshift.common.use_openshift_sdn
- - name: Reload systemd units
- command: systemctl daemon-reload
- when: (node_install_result | changed or (openshift.common.use_openshift_sdn
- and sdn_install_result | changed))
- # TODO: add the validate parameter when there is a validation command to run
- - name: Create the Node config
- template:
- dest: "{{ openshift_node_config_file }}"
- src: node.yaml.v1.j2
- notify:
- - restart openshift-node
- - name: Configure OpenShift Node settings
- lineinfile:
- dest: /etc/sysconfig/openshift-node
- regexp: "{{ item.regex }}"
- line: "{{ item.line }}"
- with_items:
- - regex: '^OPTIONS='
- line: "OPTIONS=--loglevel={{ openshift.node.debug_level }}"
- - regex: '^CONFIG_FILE='
- line: "CONFIG_FILE={{ openshift_node_config_file }}"
- notify:
- - restart openshift-node
- - name: Allow NFS access for VMs
- seboolean: name=virt_use_nfs state=yes persistent=yes
- - name: Start and enable openshift-node
- service: name=openshift-node enabled=yes state=started
|