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.
|
# 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/
|
# https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/
|
||||||
cd library; \
|
cd library; \
|
||||||
GOOS=linux GOARCH=amd64 go build -o helloworld_linux helloworld.go; \
|
GOOS=linux GOARCH=amd64 go build -o helloworld_linux_x86_64 helloworld.go; \
|
||||||
GOOS=windows GOARCH=amd64 go build -o helloworld_win32nt.exe helloworld.go; \
|
GOOS=linux GOARCH=ppc64le go build -o helloworld_linux_ppc64le helloworld.go; \
|
||||||
GOOS=darwin GOARCH=amd64 go build -o helloworld_darwin helloworld.go; \
|
GOOS=aix GOARCH=ppc64 go build -o helloworld_aix_chrp helloworld.go; \
|
||||||
GOOS=freebsd GOARCH=amd64 go build -o helloworld_freebsd 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:
|
clean:
|
||||||
rm -f library/helloworld_*
|
rm -f library/helloworld_*
|
||||||
|
|
|
@ -1,21 +1,9 @@
|
||||||
- hosts: testhost
|
- hosts: testhost
|
||||||
tasks:
|
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
|
- name: download binary module
|
||||||
tags: test_binary_modules
|
tags: test_binary_modules
|
||||||
get_url:
|
get_url:
|
||||||
url: "https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/{{ module_filename }}"
|
url: "https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/{{ filename }}"
|
||||||
dest: "{{ playbook_dir }}/library/{{ module_filename }}"
|
dest: "{{ playbook_dir }}/library/{{ filename }}"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
delegate_to: localhost
|
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'
|
when: ansible_system == 'Win32NT'
|
||||||
|
|
||||||
- name: Hello, World!
|
- name: Hello, World!
|
||||||
action: "helloworld_{{ ansible_system|lower }}"
|
action: "{{ filename }}"
|
||||||
register: hello_world
|
register: hello_world
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
- 'hello_world.msg == "Hello, World!"'
|
- 'hello_world.msg == "Hello, World!"'
|
||||||
|
|
||||||
- name: Hello, Ansible!
|
- name: Hello, Ansible!
|
||||||
action: "helloworld_{{ ansible_system|lower }}"
|
action: "{{ filename }}"
|
||||||
args:
|
args:
|
||||||
name: Ansible
|
name: Ansible
|
||||||
register: hello_ansible
|
register: hello_ansible
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
- 'hello_ansible.msg == "Hello, Ansible!"'
|
- 'hello_ansible.msg == "Hello, Ansible!"'
|
||||||
|
|
||||||
- name: Async Hello, World!
|
- name: Async Hello, World!
|
||||||
action: "helloworld_{{ ansible_system|lower }}"
|
action: "{{ filename }}"
|
||||||
async: 10
|
async: 10
|
||||||
poll: 1
|
poll: 1
|
||||||
when: ansible_system != 'Win32NT'
|
when: ansible_system != 'Win32NT'
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
when: async_hello_world is not skipped
|
when: async_hello_world is not skipped
|
||||||
|
|
||||||
- name: Async Hello, Ansible!
|
- name: Async Hello, Ansible!
|
||||||
action: "helloworld_{{ ansible_system|lower }}"
|
action: "{{ filename }}"
|
||||||
args:
|
args:
|
||||||
name: Ansible
|
name: Ansible
|
||||||
async: 10
|
async: 10
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
shippable/posix/group3
|
shippable/posix/group3
|
||||||
needs/target/binary_modules
|
needs/target/binary_modules
|
||||||
skip/aix
|
|
||||||
skip/power/centos
|
|
||||||
|
|
Loading…
Reference in a new issue