mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
745 B
YAML
32 lines
745 B
YAML
4 years ago
|
- hosts: localhost
|
||
|
connection: local
|
||
|
gather_facts: false
|
||
|
vars:
|
||
|
dir: files
|
||
|
tasks:
|
||
|
- file: path='{{ dir }}' state=directory
|
||
|
|
||
|
- file: path='setvars.bat' state=touch # in current directory!
|
||
|
|
||
|
- file: path='{{ dir }}/{{ item }}' state=touch
|
||
|
loop:
|
||
|
- json.c
|
||
|
- strlcpy.c
|
||
|
- base64.c
|
||
|
- json.h
|
||
|
- base64.h
|
||
|
- strlcpy.h
|
||
|
- jo.c
|
||
|
|
||
|
- name: Get working order results and sort them
|
||
|
set_fact:
|
||
|
working: '{{ query("fileglob", "setvars.bat", "{{ dir }}/*.[ch]") | sort }}'
|
||
|
|
||
|
- name: Get broken order results and sort them
|
||
|
set_fact:
|
||
|
broken: '{{ query("fileglob", "{{ dir }}/*.[ch]", "setvars.bat") | sort }}'
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- working == broken
|