[Cleanup] Clean up evoacme and evocheck roles

Don't compare with empty string as an empty string is already false and
a non-empty string is already true.

Name all tasks.
This commit is contained in:
Mathieu Trossevin 2020-06-18 17:34:22 +02:00
parent 3ec85f9560
commit 0825d88552
Signed by: mtrossevin
GPG Key ID: 81987323AE7F3E99
4 changed files with 5 additions and 4 deletions

View File

@ -4,7 +4,7 @@
shell: "(dpkg -l {{ item }} 2>/dev/null | grep -q -E '^(i|h)i') && ((apt-mark showhold | grep --quiet {{ item }}) || apt-mark hold {{ item }})"
register: apt_mark
changed_when: "item + ' set on hold.' in apt_mark.stdout"
failed_when: apt_mark.rc != 0 and not apt_mark.stdout == ''
failed_when: apt_mark.rc != 0 and apt_mark.stdout
loop: "{{ apt_hold_packages }}"
tags:
- apt

View File

@ -1,5 +1,6 @@
---
- ini_file:
- name: "Configure openssl key generation"
ini_file:
dest: "{{ evoacme_crt_dir }}/openssl.cnf"
section: 'req'
option: "{{ item.name }}"

View File

@ -16,4 +16,4 @@
src: "hooks/{{ hook_name }}"
dest: "{{ evoacme_hooks_dir }}/{{ hook_name }}"
mode: "0750"
when: _find_hook.stdout == ""
when: not _find_hook.stdout

View File

@ -10,6 +10,6 @@
- debug:
var: evocheck_run.stdout_lines
when: evocheck_run.stdout != ""
when: evocheck_run.stdout
tags:
- evocheck-exec