blob: 218ee58d9035d1b8b2b93587aee9b60d7e616c46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
- 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
|