Improve condition

This commit is contained in:
Alex Kotov 2020-01-21 16:58:09 +05:00
parent 70744fea2d
commit 1da5051b2c
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@
- name: Enable Apache sites
command: '/usr/sbin/a2ensite "{{ item.domain }}.conf"'
register: common__apache__enable_apache_sites_result
changed_when: "common__apache__enable_apache_sites_result.stdout is search('Enabling site {{ item.domain }}')"
changed_when: >
common__apache__enable_apache_sites_result.stdout is search('Enabling site')
with_items: '{{ common__apache__sites }}'
notify: common | Restart Apache