diff --git a/playbooks/roles/ironic-install/defaults/main.yml b/playbooks/roles/ironic-install/defaults/main.yml index 6b6033632..736dbb401 100644 --- a/playbooks/roles/ironic-install/defaults/main.yml +++ b/playbooks/roles/ironic-install/defaults/main.yml @@ -44,6 +44,7 @@ transform_boot_image: false # If testing is true, then the environment is setup for using libvirt # virtual machines for the hardware instead of real hardware. testing: false +ci_testing: false latest_os_ironic_url: https://raw.githubusercontent.com/juliakreger/ansible-modules-extras/features/new-openstack/cloud/os_ironic.py latest_os_ironic_node_url: https://raw.githubusercontent.com/juliakreger/ansible-modules-extras/features/new-openstack/cloud/os_ironic_node.py deploy_kernel: "{{http_boot_folder}}/coreos_production_pxe.vmlinuz" diff --git a/playbooks/roles/ironic-install/tasks/ironicclient_source_install.yml b/playbooks/roles/ironic-install/tasks/ironicclient_source_install.yml index 35f5554fe..2806c6deb 100644 --- a/playbooks/roles/ironic-install/tasks/ironicclient_source_install.yml +++ b/playbooks/roles/ironic-install/tasks/ironicclient_source_install.yml @@ -15,11 +15,15 @@ --- - name: "python-ironicclient - Retrieving library from git.openstack.org" command: git clone https://review.openstack.org/openstack/python-ironicclient chdir=/opt/stack creates=/opt/stack/python-ironicclient + when: ci_testing == false - name: "python-ironicclient - Checking out master branch" command: git checkout -f master chdir=/opt/stack/python-ironicclient + when: ci_testing == false - name: "python-ironicclient - Resetting local repository" command: git reset --hard master chdir=/opt/stack/python-ironicclient + when: ci_testing == false - name: "python-ironicclient - Resyncing local repository" command: git pull --ff-only chdir=/opt/stack/python-ironicclient + when: ci_testing == false - name: "python-ironicclient - Installing patched python-ironicclient library." command: pip install -I --force-reinstall /opt/stack/python-ironicclient diff --git a/playbooks/roles/ironic-install/tasks/main.yml b/playbooks/roles/ironic-install/tasks/main.yml index a4a872ca5..00ff0a6ad 100644 --- a/playbooks/roles/ironic-install/tasks/main.yml +++ b/playbooks/roles/ironic-install/tasks/main.yml @@ -34,35 +34,26 @@ - sgabios - name: "Ensuring /opt/stack is present" file: name=/opt/stack state=directory owner=root group=root -- name: "Downloading Ironic" - command: git clone https://git.openstack.org/openstack/ironic chdir=/opt/stack creates=/opt/stack/ironic -- name: "Ironic - checking out master branch" - command: git checkout -f master chdir=/opt/stack/ironic -- name: "Ironic - resetting master branch" - command: git reset --hard master chdir=/opt/stack/ironic -- name: "Ironic - resyncing to current master branch" - command: git pull --ff-only chdir=/opt/stack/ironic/ +- name: "Install Ironic" + # NOTE(TheJulia): In the event of CI testing, we should expect the code to + # already be in place. + include: ironic_source_download.yaml + when: ci_testing == false - name: "Ironic Client - Install from source if configured to do so." include: ironicclient_source_install.yml - when: skip_install is not defined and ironicclient_source_install is defined and ironicclient_source_install == true + when: skip_install is not defined and ((ironicclient_source_install is defined and ironicclient_source_install == true) or ci_testing == true) - name: "Ironic Client - Install from pip" pip: name=python-ironicclient state=present - when: skip_install is not defined and (ironicclient_source_install is not defined or ironicclient_source_install == false) + when: skip_install is not defined and (ironicclient_source_install is not defined or ironicclient_source_install == false) and (ci_testing == false) - name: "proliantutils - Install from pip" pip: name=proliantutils state=present when: skip_install is not defined -# TODO: The next package is installed via git and then manyally installed -# as the os_ironic and os_ironic_node are under active development and -# may require features that have not yet been released in shade. -# TODO: If the portion below remains for any period of time, it should -# be converted to an include... or consider converting to the integrated -# git module. - name: "Shade - Install from source if configured to do so" include: shade_source_install.yml - when: skip_install is not defined and shade_source_install is defined and shade_source_install == true + when: skip_install is not defined and ((shade_source_install is defined and shade_source_install == true) or ci_testing == true) - name: "Shade - Installing patched shade library." pip: name=shade state=latest - when: skip_install is not defined and (shade_source_install is not defined or shade_source_install == false) + when: skip_install is not defined and (shade_source_install is not defined or shade_source_install == false) and (ci_testing == false) - name: "Include diskimage-builder installation" include: dib_install.yml when: create_image_via_dib == true diff --git a/playbooks/roles/ironic-install/tasks/shade_source_install.yml b/playbooks/roles/ironic-install/tasks/shade_source_install.yml index 2b3b1a5b4..206b604e4 100644 --- a/playbooks/roles/ironic-install/tasks/shade_source_install.yml +++ b/playbooks/roles/ironic-install/tasks/shade_source_install.yml @@ -15,11 +15,15 @@ --- - name: "Shade - Retrieving library from git.openstack.org" command: git clone https://review.openstack.org/openstack-infra/shade chdir=/opt/stack creates=/opt/stack/shade + when: ci_testing == false - name: "Shade - Checking out master branch" command: git checkout -f master chdir=/opt/stack/shade + when: ci_testing == false - name: "Shade - Resetting local repository" command: git reset --hard master chdir=/opt/stack/shade + when: ci_testing == false - name: "Shade - Resyncing local repository" command: git pull --ff-only chdir=/opt/stack/shade + when: ci_testing == false - name: "Shade - Installing patched shade library." command: pip install -I --force-reinstall /opt/stack/shade