Wolfgang Kulhanek
2018-10-04 08abdc2342b35560a10f1fee1714ba068b0ce9cd
Fixed scaleup playbook (now works properly for OCP 3.9.14 and newer)
2 files modified
26 ■■■■ changed files
ansible/configs/ocp-workshop/scaleup.yml 24 ●●●● patch | view | raw | blame | history
ansible/roles/host-ocp-provisioner/tasks/main.yml 2 ●●● patch | view | raw | blame | history
ansible/configs/ocp-workshop/scaleup.yml
@@ -60,7 +60,6 @@
#################################################################################
# Run pre-software steps on new nodes, or all of them if we can't do just the new nodes ( pre_software playbook)
- name: Configure all hosts with Repositories, Common Files and Set environment key
  hosts:
    - "newnodes"
@@ -76,7 +75,6 @@
    - { role: "{{ ANSIBLE_REPO_PATH }}/roles/set-repositories", when: 'repo_method is defined' }
    - { role: "{{ ANSIBLE_REPO_PATH }}/roles/common", when: 'install_common' }
    - { role: "{{ ANSIBLE_REPO_PATH }}/roles/set_env_authorized_key", when: 'set_env_authorized_key' }
- name: PreSoftware flight-check
  hosts: localhost
@@ -118,9 +116,9 @@
  tags:
    - openshift_host_templates
  tasks:
    - name: generate ansible hosts file, keep it under workdir
    - name: Generate ansible hosts file, keep it under workdir
      template:
        src: "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/files/hosts_template.j2"
        src: "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/files/hosts_template.{{ osrelease }}.j2"
        dest: "{{ ANSIBLE_REPO_PATH }}/workdir/scaleup_hosts-{{ env_type }}-{{ guid }}"
      delegate_to: localhost
      become: false
@@ -159,6 +157,22 @@
      debug:
        var: openshift_install_log
        verbosity: 2
- name: Set up newly created Nodes
  gather_facts: False
  become: yes
  hosts: masters
  run_once: yes
  vars_files:
    - "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml"
  tags:
    - installing_openshift
  ## Change to scale up, and change inventory file
  tasks:
    - name: Tag new nodes with logging-infra-fluentd=true
      shell: "oc label node {{ item }} logging-infra-fluentd=true"
      with_items: "{{ groups['newnodes'] }}"
      when: install_logging|d(true)|bool
- name: Tag freshly created node as node
  hosts: localhost
@@ -210,7 +224,7 @@
    - name: generate ansible hosts file, keep it under workdir
      template:
        src: "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/files/hosts_template.j2"
        src: "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/files/hosts_template.{{ osrelease }}.j2"
        dest: "{{ ANSIBLE_REPO_PATH }}/workdir/hosts-{{ env_type }}-{{ guid }}"
      delegate_to: localhost
      become: false
ansible/roles/host-ocp-provisioner/tasks/main.yml
@@ -113,7 +113,7 @@
  tags:
    - install_openshift_node_packages
- name: Update openshift-ansible package to latest available release (3.10.14)
- name: For OCP 3.10.14 update openshift-ansible package to latest available release (3.10.21)
  yum:
    name: openshift-ansible-3.10.21
    state: present