[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 }})" 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 register: apt_mark
changed_when: "item + ' set on hold.' in apt_mark.stdout" 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 }}" loop: "{{ apt_hold_packages }}"
tags: tags:
- apt - apt

View file

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

View file

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

View file

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