Browse Source

feat: use label in loop_control

pull/1/head
Adrien Waksberg 1 year ago
parent
commit
5bdf234863
2 changed files with 11 additions and 0 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +10
    -0
      tasks/zones.yml

+ 1
- 0
CHANGELOG.md View File

@ -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


+ 10
- 0
tasks/zones.yml View File

@ -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…
Cancel
Save