[Cleanup] amazon-ec2, apache, bind, evolinux-todo, evomaintenance

Don't compare with empty string

Name all tasks

Variables should have space before and after their name
This commit is contained in:
Mathieu Trossevin 2020-06-18 17:52:10 +02:00
parent 0825d88552
commit 26eec48954
Signed by: mtrossevin
GPG key ID: 81987323AE7F3E99
6 changed files with 23 additions and 21 deletions

View file

@ -14,7 +14,7 @@
# The last character "\u000A" is a line feed (LF), it's better to keep it # The last character "\u000A" is a line feed (LF), it's better to keep it
content: "{{ apache_serverstatus_suffix }}\u000A" content: "{{ apache_serverstatus_suffix }}\u000A"
force: yes force: yes
when: apache_serverstatus_suffix != "" when: apache_serverstatus_suffix
- name: generate random string for server-status suffix - name: generate random string for server-status suffix
shell: "apg -a 1 -M N -n 1 > {{ apache_serverstatus_suffix_file }}" shell: "apg -a 1 -M N -n 1 > {{ apache_serverstatus_suffix_file }}"

View file

@ -94,7 +94,7 @@
- debug: - debug:
var: chrootbind_run.stdout_lines var: chrootbind_run.stdout_lines
when: bind_chroot_set and chrootbind_run.stdout != "" when: bind_chroot_set and chrootbind_run.stdout
- name: Modify OPTIONS in /etc/default/bind9 for chroot - name: Modify OPTIONS in /etc/default/bind9 for chroot
replace: replace:

View file

@ -10,4 +10,4 @@
- name: "Content of /etc/evolinux/todo.txt" - name: "Content of /etc/evolinux/todo.txt"
debug: debug:
var: evolinux_todo.stdout_lines var: evolinux_todo.stdout_lines
when: evolinux_todo.stdout != "" when: evolinux_todo.stdout

View file

@ -1,9 +1,11 @@
--- ---
- set_fact: - name: "Choose if minifirewall will need to be restarted"
set_fact:
minifirewall_restart_handler_name: "{{ minifirewall_restart_if_needed | ternary('restart minifirewall', 'restart minifirewall (noop)') }}" minifirewall_restart_handler_name: "{{ minifirewall_restart_if_needed | ternary('restart minifirewall', 'restart minifirewall (noop)') }}"
- assert: - name: "Check that API variables are set"
assert:
that: that:
- evomaintenance_api_endpoint is not none - evomaintenance_api_endpoint is not none
- evomaintenance_api_key is not none - evomaintenance_api_key is not none