Add new arches/OSes for binary_modules tests (#69052)
This commit is contained in:
parent
af44bd4ddd
commit
d17a44b0c5
5 changed files with 15 additions and 24 deletions
|
@ -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_*
|
||||
|
|
|
@ -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
|
||||
|
|
3
test/integration/targets/binary_modules/group_vars/all
Normal file
3
test/integration/targets/binary_modules/group_vars/all
Normal file
|
@ -0,0 +1,3 @@
|
|||
system: "{{ ansible_system|lower }}"
|
||||
suffix: "{{ '.exe' if system == 'win32nt' else '' }}"
|
||||
filename: "helloworld_{{ system }}_{{ ansible_architecture }}{{ suffix }}"
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
shippable/posix/group3
|
||||
needs/target/binary_modules
|
||||
skip/aix
|
||||
skip/power/centos
|
||||
|
|
Loading…
Reference in a new issue