Changeset - c254c806349c
[Not reviewed]
0 2 0
Branko Majic (branko) - 4 years ago 2020-01-06 16:10:55
branko@majic.rs
MAR-148: Fix Ansible warnings for the common role:

- Use the length filter for conditionals that require a (parameter)
list to be non-empty.
- Use explicit quoting for the cron task hour/minute.
2 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
roles/common/handlers/main.yml
Show inline comments
 
@@ -43,4 +43,4 @@
 
  service:
 
    name: ntp
 
    state: restarted
 
  when: ntp_servers
 
  when: ntp_servers | length > 0
roles/common/tasks/main.yml
Show inline comments
 
@@ -264,8 +264,8 @@
 
  cron:
 
    name: "check_certificate"
 
    cron_file: "check_certificate"
 
    hour: 0
 
    minute: 0
 
    hour: "0"
 
    minute: "0"
 
    job: "/usr/local/bin/check_certificate.sh -q expiration"
 
    state: present
 
    user: nobody
 
@@ -453,7 +453,7 @@
 
      - ntp
 
      - ntpdate
 
    state: present
 
  when: ntp_servers
 
  when: ntp_servers | length > 0
 

	
 
- name: Deploy NTP configuration
 
  template:
 
@@ -462,7 +462,7 @@
 
    owner: root
 
    group: root
 
    mode: 0644
 
  when: ntp_servers
 
  when: ntp_servers | length > 0
 
  notify:
 
    - Restart NTP server
 

	
0 comments (0 inline, 0 general)