Skip to content

Commit

Permalink
Make edpm_logrotate_crond role compliant with ansible-lint `product…
Browse files Browse the repository at this point in the history
…ion` profile

- Fixed indentation in yaml file
- Changed `mode` parameter to be a string
- Fixed spacing issues

Signed-off-by: Roberto Alfieri <[email protected]>
  • Loading branch information
rebtoor committed Oct 9, 2023
1 parent 18505e8 commit 07c005d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions roles/edpm_logrotate_crond/files/logrotate_crond.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---

command: /usr/sbin/crond -s -n
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"
merge: true
preserve_properties: true
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"
merge: true
preserve_properties: true
2 changes: 1 addition & 1 deletion roles/edpm_logrotate_crond/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ argument_specs:
description: Configures the dateext parameter.
edpm_logrotate_crond_dateformat:
default: null
description: Configures the dateformat parameter used with dateext parameter.
description: Configures the dateformat parameter used with dateext parameter.
edpm_logrotate_crond_dateyesterday:
default: null
description: Configures the dateyesterday parameter used with dateext parameter.
8 changes: 5 additions & 3 deletions roles/edpm_logrotate_crond/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
dest: /usr/local/sbin/containers-tmpwatch
owner: root
group: root
mode: 0755
mode: "0755"
content: |
#!/bin/sh
tmpwatch --nodirs \
Expand Down Expand Up @@ -55,7 +55,7 @@
ansible.builtin.template:
src: logrotate-crond.conf.j2
dest: "{{ edpm_logrotate_crond_config_dir }}/etc/logrotate-crond.conf"
mode: 0644
mode: "0644"

- name: Configure cron entry command
ansible.builtin.cron:
Expand All @@ -68,7 +68,9 @@
weekday: "*"
env: false
name: openstack
job: sleep `expr ${RANDOM} \% 90`; /usr/sbin/logrotate -s /var/lib/logrotate/logrotate-crond.status /etc/logrotate-crond.conf 2>&1|logger -t logrotate-crond
job: >
sleep `expr ${RANDOM} \% 90`; /usr/sbin/logrotate -s /var/lib/logrotate/logrotate-crond.status /etc/logrotate-crond.conf 2>&1|
logger -t logrotate-crond
- name: Configure cron entry $PATH env var
ansible.builtin.cron:
Expand Down

0 comments on commit 07c005d

Please sign in to comment.