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

Fixity: Add cron variables #409

Open
wants to merge 1 commit into
base: qa/1.x
Choose a base branch
from
Open

Conversation

blossomgoyal
Copy link

@blossomgoyal blossomgoyal commented Oct 17, 2024

Add cron variables:

archivematica_fixity_cron_minute: "0"
archivematica_fixity_cron_hour: "0"
archivematica_fixity_cron_day: "*"
archivematica_fixity_cron_month: "*/6"
archivematica_fixity_cron_weekday: "*"

Connects to archivematica/Issues#1712

@blossomgoyal blossomgoyal self-assigned this Oct 17, 2024
@@ -23,6 +23,12 @@ archivematica_src_ss_gunicorn_config: "/etc/archivematica/storage-service.gunico
archivematica_src_am_amauat_deps: []
archivematica_src_am_fixity_deps: []

archivematica_fixity_cron_minute: "0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The vars/main.yml is not the best place to put the variables when you want to allow the change when settings in host_vars or group_vars.

See: https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#understanding-variable-precedence

I'd use defaults/main.yml instead to set the default values.

@mamedin
Copy link
Contributor

mamedin commented Oct 21, 2024

As an improvement, please add the disabled option:

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/cron_module.html#parameter-disabled

Set false as default value in default/main.yml.

This way we can disable the cron job from ansible.

@mamedin
Copy link
Contributor

mamedin commented Oct 22, 2024

And finally about variable names, if you check the existing variables in role, they all start with archivematica_src, we have several variables for fixity in defaults/main.yml, so they should start with archivematica_src_fixity

https://github.com/artefactual-labs/ansible-archivematica-src/blob/qa/1.x/defaults/main.yml#L181C1-L189C50

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

Successfully merging this pull request may close these issues.

2 participants