Add missed variables to image upload command

Change-Id: Ibef7838e2ca912dc1df2395ab8c3c05b90d0bdb1
This commit is contained in:
Sagi Shnaidman 2020-04-09 15:23:28 +03:00
parent 0ab073c09b
commit 6643f7d204
3 changed files with 27 additions and 0 deletions

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"

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"

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