diff --git a/test/integration/targets/binary_modules/Makefile b/test/integration/targets/binary_modules/Makefile index d6b791730f9b0e..c3092e47404d9f 100644 --- a/test/integration/targets/binary_modules/Makefile +++ b/test/integration/targets/binary_modules/Makefile @@ -5,10 +5,12 @@ all: # This avoids a dependency on go and keeps the binaries out of our git repository. # https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/ cd library; \ - GOOS=linux GOARCH=amd64 go build -o helloworld_linux helloworld.go; \ - GOOS=windows GOARCH=amd64 go build -o helloworld_win32nt.exe helloworld.go; \ - GOOS=darwin GOARCH=amd64 go build -o helloworld_darwin helloworld.go; \ - GOOS=freebsd GOARCH=amd64 go build -o helloworld_freebsd helloworld.go + GOOS=linux GOARCH=amd64 go build -o helloworld_linux_x86_64 helloworld.go; \ + GOOS=linux GOARCH=ppc64le go build -o helloworld_linux_ppc64le helloworld.go; \ + GOOS=aix GOARCH=ppc64 go build -o helloworld_aix_chrp helloworld.go; \ + GOOS=windows GOARCH=amd64 go build -o helloworld_win32nt_64-bit.exe helloworld.go; \ + GOOS=darwin GOARCH=amd64 go build -o helloworld_darwin_x86_64 helloworld.go; \ + GOOS=freebsd GOARCH=amd64 go build -o helloworld_freebsd_amd64 helloworld.go clean: rm -f library/helloworld_* diff --git a/test/integration/targets/binary_modules/download_binary_modules.yml b/test/integration/targets/binary_modules/download_binary_modules.yml index eda1a405e1957a..e8f51b1aefb3df 100644 --- a/test/integration/targets/binary_modules/download_binary_modules.yml +++ b/test/integration/targets/binary_modules/download_binary_modules.yml @@ -1,21 +1,9 @@ - hosts: testhost tasks: - - debug: var=ansible_system - - - name: set module filename (POSIX) - set_fact: - module_filename: "helloworld_{{ ansible_system | lower }}" - when: ansible_system != 'Win32NT' - - - name: set module filename (Win32NT) - set_fact: - module_filename: "helloworld_{{ ansible_system | lower }}.exe" - when: ansible_system == 'Win32NT' - - name: download binary module tags: test_binary_modules get_url: - url: "https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/{{ module_filename }}" - dest: "{{ playbook_dir }}/library/{{ module_filename }}" + url: "https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/{{ filename }}" + dest: "{{ playbook_dir }}/library/{{ filename }}" mode: 0755 delegate_to: localhost diff --git a/test/integration/targets/binary_modules/group_vars/all b/test/integration/targets/binary_modules/group_vars/all new file mode 100644 index 00000000000000..1d3ff5e4a823b3 --- /dev/null +++ b/test/integration/targets/binary_modules/group_vars/all @@ -0,0 +1,3 @@ +system: "{{ ansible_system|lower }}" +suffix: "{{ '.exe' if system == 'win32nt' else '' }}" +filename: "helloworld_{{ system }}_{{ ansible_architecture }}{{ suffix }}" diff --git a/test/integration/targets/binary_modules/roles/test_binary_modules/tasks/main.yml b/test/integration/targets/binary_modules/roles/test_binary_modules/tasks/main.yml index d07c380e13e881..35a58dcb7f526c 100644 --- a/test/integration/targets/binary_modules/roles/test_binary_modules/tasks/main.yml +++ b/test/integration/targets/binary_modules/roles/test_binary_modules/tasks/main.yml @@ -9,7 +9,7 @@ when: ansible_system == 'Win32NT' - name: Hello, World! - action: "helloworld_{{ ansible_system|lower }}" + action: "{{ filename }}" register: hello_world - assert: @@ -17,7 +17,7 @@ - 'hello_world.msg == "Hello, World!"' - name: Hello, Ansible! - action: "helloworld_{{ ansible_system|lower }}" + action: "{{ filename }}" args: name: Ansible register: hello_ansible @@ -27,7 +27,7 @@ - 'hello_ansible.msg == "Hello, Ansible!"' - name: Async Hello, World! - action: "helloworld_{{ ansible_system|lower }}" + action: "{{ filename }}" async: 10 poll: 1 when: ansible_system != 'Win32NT' @@ -39,7 +39,7 @@ when: async_hello_world is not skipped - name: Async Hello, Ansible! - action: "helloworld_{{ ansible_system|lower }}" + action: "{{ filename }}" args: name: Ansible async: 10 diff --git a/test/integration/targets/binary_modules_posix/aliases b/test/integration/targets/binary_modules_posix/aliases index e33a31e870e3f5..2c6e4a07c83b44 100644 --- a/test/integration/targets/binary_modules_posix/aliases +++ b/test/integration/targets/binary_modules_posix/aliases @@ -1,4 +1,2 @@ shippable/posix/group3 needs/target/binary_modules -skip/aix -skip/power/centos