feat: use label in loop_control
This commit is contained in:
parent
1dc9ed9418
commit
5bdf234863
2 changed files with 11 additions and 0 deletions
|
@ -8,6 +8,7 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|||
### Changed
|
||||
|
||||
- test: replace kitchen to molecule
|
||||
- feat: use label in loop_control
|
||||
|
||||
## v1.3.0 (2020-02-12)
|
||||
- feat: add support debian 10
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
set_fact:
|
||||
bind_zones_play: '{{ bind_zones_play|default([]) + [ item ] }}'
|
||||
loop: '{{ bind_zones|dict2items }}'
|
||||
loop_control:
|
||||
label: '{{ item.key }}'
|
||||
when: >
|
||||
(item.value.state is not defined or item.value.state != 'absent')
|
||||
and (bind_zones_subset is not defined or item.key in bind_zones_subset)
|
||||
|
@ -14,6 +16,8 @@
|
|||
group: bind
|
||||
mode: 0755
|
||||
state: directory
|
||||
loop_control:
|
||||
label: '{{ item.key }}'
|
||||
loop: '{{ bind_zones_play }}'
|
||||
|
||||
- name: copy zone files
|
||||
|
@ -24,6 +28,8 @@
|
|||
group: root
|
||||
mode: 0644
|
||||
loop: '{{ bind_zones_play }}'
|
||||
loop_control:
|
||||
label: '{{ item.key }}'
|
||||
register: zone
|
||||
notify: reload bind
|
||||
|
||||
|
@ -34,6 +40,8 @@
|
|||
args:
|
||||
chdir: /etc/bind/keys
|
||||
loop: '{{ zone.results }}'
|
||||
loop_control:
|
||||
label: '{{ item.item.key }}'
|
||||
when: item.item.key in bind_dnssec and item.changed
|
||||
notify: reload bind
|
||||
|
||||
|
@ -49,6 +57,8 @@
|
|||
path: '{{ item.path }}'
|
||||
state: absent
|
||||
loop: '{{ zone_folders.files }}'
|
||||
loop_control:
|
||||
label: '{{ item.path|basename }}'
|
||||
when: >
|
||||
item.path|basename not in bind_zones or
|
||||
('state' in bind_zones[item.path|basename] and bind_zones[item.path|basename].state == 'absent')
|
||||
|
|
Loading…
Reference in a new issue