Script to automate time-in and time-out on Peoplestrong.
- Configure hosts file with ip address, set user and group for file permissions and configure target host timezone.
- To install script on host, use peoplestrong role.
ansible-playbook -i ansible/hosts ansible/main.yml --tags=peoplestrong
- Enable Peoplestrong crontab using peoplestrong-enable role.
ansible-playbook -i ansible/hosts ansible/main.yml --tags=peoplestrong-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 peoplestrong-disable role. Take note you'll need to run peoplestrong-enable role again, preferably before the next time in.
ansible-playbook -i ansible/hosts ansible/main.yml --tags=peoplestrong-disable
- You can also reconfigure time in/out randomness by adjusting crontab sleep delay on peoplestrong-enable/disable roles. Script currently has a delay of 0 to 120 seconds. Adjust accordingly.