Browse Source

Merge "Add missed variables to image upload command"

tags/0.2.0
Zuul 3 months ago
committed by Gerrit Code Review
parent
commit
2492a9aef3
3 changed files with 27 additions and 0 deletions
  1. +2
    -0
      roles/tripleo_overcloud_image_upload/defaults/main.yml
  2. +22
    -0
      roles/tripleo_overcloud_image_upload/molecule/default/converge.yml
  3. +3
    -0
      roles/tripleo_overcloud_image_upload/tasks/main.yml

+ 2
- 0
roles/tripleo_overcloud_image_upload/defaults/main.yml View File

@@ -18,4 +18,6 @@ tripleo_overcloud_image_upload_rc_file: "{{ tripleo_rc_file | default(ansible_en
tripleo_overcloud_image_upload_timeout: 600
tripleo_overcloud_image_upload_update_existing: false
tripleo_overcloud_image_upload_whole_disk: false
tripleo_overcloud_image_upload_local: false
tripleo_overcloud_image_upload_local_path:
tripleo_overcloud_image_upload_log: "{{ tripleo_overcloud_image_upload_home_dir }}/overcloud_image_upload.log"

+ 22
- 0
roles/tripleo_overcloud_image_upload/molecule/default/converge.yml View File

@@ -119,3 +119,25 @@
assert:
that:
- tripleo_overcloud_image_upload_result.stdout == "overcloud image upload --image-type os"

- name: Check parameter "tripleo_overcloud_image_upload_local"
include_role:
name: "tripleo_overcloud_image_upload"
vars:
tripleo_overcloud_image_upload_local: true

- name: Assert "tripleo_overcloud_image_upload_local"
assert:
that:
- tripleo_overcloud_image_upload_result.stdout == "overcloud image upload --local"

- name: Check parameter "tripleo_overcloud_image_upload_local_path"
include_role:
name: "tripleo_overcloud_image_upload"
vars:
tripleo_overcloud_image_upload_local_path: /var/lib/ironic/images/test

- name: Assert "tripleo_overcloud_image_upload_local_path"
assert:
that:
- tripleo_overcloud_image_upload_result.stdout == "overcloud image upload --local-path /var/lib/ironic/images/test"

+ 3
- 0
roles/tripleo_overcloud_image_upload/tasks/main.yml View File

@@ -14,6 +14,8 @@
{{ tripleo_overcloud_image_upload_architecture | ternary('--architecture $UPLOAD_ARCHITECTURE', '') }}
{{ tripleo_overcloud_image_upload_platform | ternary('--platform $UPLOAD_PLATFORM', '') }}
{{ tripleo_overcloud_image_upload_image_type | ternary('--image-type $UPLOAD_IMAGE_TYPE', '') }}
{{ tripleo_overcloud_image_upload_local | ternary('--local', '') }}
{{ tripleo_overcloud_image_upload_local_path | ternary('--local-path $UPLOAD_LOCAL_PATH', '') }}
{{ tripleo_overcloud_image_upload_log_output | ternary((">$UPLOAD_LOG"), '') }}
{{ tripleo_overcloud_image_upload_log_combine | ternary("2>&1", '') }}

@@ -39,6 +41,7 @@
UPLOAD_PLATFORM: "{{ tripleo_overcloud_image_upload_platform }}"
UPLOAD_IMAGE_TYPE: "{{ tripleo_overcloud_image_upload_image_type }}"
UPLOAD_LOG: "{{ tripleo_overcloud_image_upload_log }}"
UPLOAD_LOCAL_PATH: "{{ tripleo_overcloud_image_upload_local_path }}"
args:
chdir: "{{ tripleo_overcloud_image_upload_home_dir }}"
warn: false


Loading…
Cancel
Save