diff --git a/roles/nodepool-setup/defaults/main.yml b/roles/nodepool-setup/defaults/main.yml index 5d2ac7901..2dfe1089d 100644 --- a/roles/nodepool-setup/defaults/main.yml +++ b/roles/nodepool-setup/defaults/main.yml @@ -10,3 +10,12 @@ repos: - https://git.openstack.org/openstack-infra/devstack-gate zuul_changes: "{{ lookup('env', 'ZUUL_CHANGES') }}" subnode_swap_size: 8388608 # 8GB +update_subnodes: true +rdo_cloud_provider: true +packages_list: + - git + - unbound + - screen + - vim + - wget + - iptables-services diff --git a/roles/nodepool-setup/tasks/etc-nodepool.yml b/roles/nodepool-setup/tasks/etc-nodepool.yml index 9498a559b..be79d88f7 100644 --- a/roles/nodepool-setup/tasks/etc-nodepool.yml +++ b/roles/nodepool-setup/tasks/etc-nodepool.yml @@ -28,7 +28,7 @@ - name: Create /etc/nodepool/provider copy: content: | - NODEPOOL_PROVIDER=rdo-cloud-tripleo + NODEPOOL_PROVIDER={% if rdo_cloud_provider|bool %}rdo-cloud-tripleo{% else %}fake-cloud{% endif %} NODEPOOL_CLOUD=fake-cloud NODEPOOL_REGION=FAKE NODEPOOL_AZ= diff --git a/roles/nodepool-setup/tasks/main.yml b/roles/nodepool-setup/tasks/main.yml index be1cf2c6f..68f2eef6c 100644 --- a/roles/nodepool-setup/tasks/main.yml +++ b/roles/nodepool-setup/tasks/main.yml @@ -35,15 +35,8 @@ - name: Install packages yum: - name: "{{ item }}" + name: "{{ packages_list }}" state: latest - with_items: - - git - - unbound - - screen - - vim - - wget - - iptables-services become: true - include: clone-ci-repos.yml @@ -112,21 +105,24 @@ - "EXTRA_VARS=' --extra-vars vxlan_mtu=1400'" become: true -- name: Update packages - yum: - name: '*' - state: latest - become: true +- when: update_subnodes|bool + block: -- name: Reboot hosts - shell: sleep 2 && shutdown -r now - async: 1 - poll: 0 - ignore_errors: true - become: true + - name: Update packages + yum: + name: '*' + state: latest + become: true -- name: Wait a little - pause: seconds=30 + - name: Reboot hosts + shell: sleep 2 && shutdown -r now + async: 1 + poll: 0 + ignore_errors: true + become: true -- name: Wait for provisioned hosts to become reachable - local_action: wait_for host="{{ hostvars[inventory_hostname].subnode_public_ip }}" port=22 delay=5 state=started connect_timeout=10 timeout=180 + - name: Wait a little + pause: seconds=30 + + - name: Wait for provisioned hosts to become reachable + local_action: wait_for host="{{ hostvars[inventory_hostname].subnode_public_ip }}" port=22 delay=5 state=started connect_timeout=10 timeout=180