Skip to content

Allow user/playbook to specify dehyraded cron call #26

@eengstrom

Description

@eengstrom

I had need to change the call made to dehydrated as embedded into the cron or systemd service. Also, there are subtle variations on the call to this scattered through the code. With the proposed change, one may change the command, adding arguments or even embed into a pipe to redirect output as needed.

Documentation and defaults added. Default value for new variable:

dehydrated_renew_command: "{{ dehydrated_install_root }}/dehydrated --cron"

Alternative example uses:

  • Don't give up on first failure:
dehydrated_renew_command: "{{ dehydrated_install_root }}/dehydrated --cron --keep-going"
  • More complicated example to redirect output to syslog:
dehydrated_renew_command: "bash -c '({{ dehydrated_install_root
}}/dehydrated -c -g | logger -t dehydrated -p local7.info) 2>&1 | logger
-t dehydrated -p local7.error -s'"

... although the latter is somewhat contrived and one would probably be
better served by using a systemd timer rather than a cron job, which
would then do effectively the same thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions