-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshoot.yml
46 lines (38 loc) · 968 Bytes
/
shoot.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
- name: Shoot | Reset badshoot.
set_fact:
badshoot: no
- name: Automated tests.
when: not testing
block:
- name: Shoot | Ask.
pause:
prompt: "Enter a list of rooms to shoot into: (space separated)"
register: choice
- name: Shoot | Parse choice.
set_fact:
rooms: "{{ choice.user_input.split(' ') }}"
- name: Shoot | Verify choice.
set_fact:
badshoot: yes
when: "rooms[0] == ''"
- name: Shoot | Hum.
debug:
msg: "The arrow falls to the ground at your feet."
when: badshoot
- name: Shoot | ...
when: not badshoot
block:
- name: Shoot | Consume an arrow.
set_fact:
arrows: "{{ arrows|int - 1 }}"
- name: Shoot | Define arrow position.
set_fact:
arrow: "{{ position }}"
- name: Shoot | Reset necessary variables.
set_fact:
roomcnt: "0"
toofar: no
failedhit: no
- name: Shoot | Arrows
include_tasks: arrow.yml