Skip to content

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 requested a review from mamedin October 17, 2024 18:04
@blossomgoyal blossomgoyal self-assigned this Oct 17, 2024
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.

3 participants