Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.2 KB

README.md

File metadata and controls

32 lines (20 loc) · 1.2 KB

Salarium

Script to automate time-in and time-out on Salarium.

Usage

  1. Configure hosts file with ip address, set user and group for file permissions and configure target host timezone.
  2. To install script on host, use salarium role.
ansible-playbook -i ansible/hosts ansible/main.yml --tags=salarium
  1. Enable Salarium crontab using salarium-enable role.
ansible-playbook -i ansible/hosts ansible/main.yml --tags=salarium-enable
  1. Holidays are handled using python-holidays library. You can set your country and region as you desire.

  2. 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
  1. 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.

Acknowledgements

Jerico Aragon's curl script