Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts, postrotate, multiple entries #33

Open
tman77 opened this issue Sep 26, 2017 · 1 comment
Open

scripts, postrotate, multiple entries #33

tman77 opened this issue Sep 26, 2017 · 1 comment

Comments

@tman77
Copy link

tman77 commented Sep 26, 2017

I am trying to use this role to set the log owner and permissions, but I am using copytruncate, so I can't use the create directive.

Is there a way to do it in scripts, postrotate. When I tested, it only allows one entry for postrotate I believe because it is a dict object.

i.e.

scripts:
  postrotate: chown app:app /mnt/log/test/*.log
  postrotate: chmod 0644 /mnt/log/test/*.log

If I run the above, only the chmod line is applied when the playbook is run...

@jewzaam
Copy link

jewzaam commented Nov 15, 2017

Haven't used this role yet, but have you tried:

scripts:
  postrotate: chown app:app /mnt/log/test/*.log && chmod 0644 /mnt/log/test/*.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants