Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 21 additions & 20 deletions roles/devstack_installer/tasks/prepare_system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,10 @@
# under the License.

# Prepare devstack node system
# This task file handles system updates, package installation, network configuration, reboot, and verification
# This task file handles network configuration, system updates, package installation, reboot, and verification
# After this completes successfully, the system is fully prepared and ready for devstack installation

- name: Update all packages to latest version
become: true
ansible.builtin.apt:
upgrade: dist
update_cache: true
cache_valid_time: 3600
when: devstack_update_packages | bool

- name: Install required packages
become: true
ansible.builtin.apt:
name:
- git
- python3
- python3-pip
state: present
update_cache: true

# Network configuration
# Network configuration - must run first to ensure external connectivity
- name: Disable cloud-init network configuration
become: true
ansible.builtin.copy:
Expand Down Expand Up @@ -81,6 +63,25 @@
when: "'UP' not in trunk_check.stdout"
changed_when: true

# Package updates - run after network configuration to ensure external connectivity
- name: Update all packages to latest version
become: true
ansible.builtin.apt:
upgrade: dist
update_cache: true
cache_valid_time: 3600
when: devstack_update_packages | bool

- name: Install required packages
become: true
ansible.builtin.apt:
name:
- git
- python3
- python3-pip
state: present
update_cache: true

- name: Reboot system to apply updates and network configuration
become: true
ansible.builtin.reboot:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ stages:
Transitions nodes from 'enroll' to 'manageable' state. This validates
basic hardware connectivity and prepares nodes for further operations.
shell: |
set -xe -o pipefail
set -x

# Get list of node UUIDs
node_uuids=$(openstack --os-cloud devstack-admin baremetal node list -f value -c UUID)
Expand Down
Loading