Script to automate time-in and time-out on Salarium.
- Configure hosts file with ip address, set user and group for file permissions and configure target host timezone.
- To install script on host, use salarium role.
ansible-playbook -i ansible/hosts ansible/main.yml --tags=salarium
- Enable Salarium crontab using salarium-enable role.
ansible-playbook -i ansible/hosts ansible/main.yml --tags=salarium-enable
-
Holidays are handled using python-holidays library. You can set your country and region as you desire.
-
On unscheduled dates (e.g. sick leave) where you don't need to time in/out you need to manually disable the crontab using salarium-disable role. Take note you'll need to run salarium-enable role again, preferably before the next time in.
ansible-playbook -i ansible/hosts ansible/main.yml --tags=salarium-disable
- You can also reconfigure time in/out randomness by adjusting crontab sleep delay on salarium-enable/disable roles. Script currently has a delay of 0 to 120 seconds. Adjust accordingly.