From cafed004adeb698b7169435ac9c618db7771a92f Mon Sep 17 00:00:00 2001 From: abarbare Date: Thu, 11 Oct 2018 19:03:18 +0000 Subject: [PATCH] fix scaleway user data tests (#46570) * fix scaleway user data tests * default values * pep8 --- .../scaleway_user_data/defaults/main.yml | 6 ++++- .../roles/scaleway_user_data/tasks/main.yml | 22 +++++++++---------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/test/legacy/roles/scaleway_user_data/defaults/main.yml b/test/legacy/roles/scaleway_user_data/defaults/main.yml index c3b14c3b3d..69396fccaa 100644 --- a/test/legacy/roles/scaleway_user_data/defaults/main.yml +++ b/test/legacy/roles/scaleway_user_data/defaults/main.yml @@ -8,4 +8,8 @@ cloud_init_script: ''' # this message is written by cloud-final when the system is finished # its first boot final_message: "The system is finally up, after $UPTIME seconds" -''' \ No newline at end of file +''' +scaleway_image_id: 89ee4018-f8c3-4dc4-a6b5-bca14f985ebe +scaleway_organization: '{{ scw_org }}' +scaleway_region: ams1 +scaleway_commerial_type: START1-S diff --git a/test/legacy/roles/scaleway_user_data/tasks/main.yml b/test/legacy/roles/scaleway_user_data/tasks/main.yml index 62951cee72..ee62b35003 100644 --- a/test/legacy/roles/scaleway_user_data/tasks/main.yml +++ b/test/legacy/roles/scaleway_user_data/tasks/main.yml @@ -4,10 +4,10 @@ scaleway_compute: name: foobar state: present - image: 857de28c-39ce-4b15-9389-b68d8bb1bb51 - organization: 951df375-e094-4d26-97c1-ba548eeb9c42 - region: par1 - commercial_type: START1-S + image: '{{ scaleway_image_id }}' + organization: '{{ scaleway_organization }}' + region: '{{ scaleway_region }}' + commercial_type: '{{ scaleway_commerial_type }}' wait: true register: server_creation_task @@ -22,7 +22,7 @@ - name: Patch user_data cloud-init configuration (Check) check_mode: yes scaleway_user_data: - region: par1 + region: '{{ scaleway_region }}' server_id: "{{ server_id }}" user_data: cloud-init: "{{ cloud_init_script }}" @@ -37,7 +37,7 @@ - name: Patch user_data cloud-init configuration scaleway_user_data: - region: par1 + region: '{{ scaleway_region }}' server_id: "{{ server_id }}" user_data: cloud-init: "{{ cloud_init_script }}" @@ -52,7 +52,7 @@ - name: Patch user_data cloud-init configuration (Confirmation) scaleway_user_data: - region: par1 + region: '{{ scaleway_region }}' server_id: "{{ server_id }}" user_data: cloud-init: "{{ cloud_init_script }}" @@ -69,10 +69,10 @@ scaleway_compute: name: foobar state: absent - region: par1 - image: 857de28c-39ce-4b15-9389-b68d8bb1bb51 - organization: 951df375-e094-4d26-97c1-ba548eeb9c42 - commercial_type: START1-S + region: '{{ scaleway_region }}' + image: '{{ scaleway_image_id }}' + organization: '{{ scaleway_organization }}' + commercial_type: '{{ scaleway_commerial_type }}' wait: true register: server_destroy_task