Skip to content

Commit fa18d58

Browse files
committed
Drop owner/group from /var/lib/openstack
These tasks run with "become: true", so the /var/lib/openstack dir should be root owned, just like the scripts created in the dir. Also correct the verified path to the tmpwatch script in the molecule verify.yml. Signed-off-by: James Slagle <[email protected]>
1 parent 5a65fbb commit fa18d58

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

roles/edpm_logrotate_crond/molecule/default/converge.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
hosts: all
2020
gather_facts: false
2121
tasks:
22+
2223
- name: install edpm_logrotate_crond
2324
include_role:
2425
name: "osp.edpm.edpm_logrotate_crond"

roles/edpm_logrotate_crond/molecule/default/verify.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323

2424
- name: Push script
2525
ansible.builtin.stat:
26-
path: /usr/local/sbin/containers-tmpwatch
26+
path: /var/lib/openstack/cron/containers-tmpwatch
2727
register: stat_result
2828
failed_when: not stat_result.stat.exists
2929

3030
- name: Insert cronjob in root crontab
3131
ansible.builtin.shell:
3232
crontab -l
3333
register: crontab
34-
failed_when: "'@daily /usr/local/sbin/containers-tmpwatch' not in crontab.stdout"
34+
failed_when: "'@daily /var/lib/openstack/cron/containers-tmpwatch' not in crontab.stdout"
3535

3636
- name: Ensure config directories exist
3737
ansible.builtin.stat:

roles/edpm_logrotate_crond/tasks/configure.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
path: "/var/lib/openstack"
2323
mode: 0755
2424
state: directory
25-
owner: "{{ ansible_user }}"
26-
group: "{{ ansible_user }}"
2725
setype: "container_file_t"
2826

2927
- name: Create /var/lib/openstack/cron

roles/edpm_logrotate_crond/tasks/install.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- name: Gather local facts
1919
ansible.builtin.setup:
2020
gather_subset:
21+
- "!all"
22+
- "!min"
2123
- "local"
2224

2325
- name: Install cronie

0 commit comments

Comments
 (0)