Scripts to automate the CMS related maintenance and manage contestant machines.
Note: secret keys and other important credentials shall be stored in provisioning server. Do not publish it to Git repo.
ansible-playbook install_cms.yml -i hosts_stage
Keep different inventories for development, testing and production(hosts_dev, hosts_test and hosts_prd, correspondingly).
This playbook first updates and installs necessary packages. To skip this process for the next runs, use --skip-tags "tag1,tag2" parameter. To run the specific tag use --tags "tagname" syntax.
ansible-playbook provision_cms_config.yml -i hosts_stage
to cleanup and updating new images:
ansible-playbook refresh_ranking_data.yml -i hosts_stage
-
Unlock and lock during the contests --
-
Enable/distable USB --
-
General : run any bash script on a host --
-
To add a contestant user to contestant machines with contestant_manage playbook:
ansible-playbook add_user.yml –extra-vars “username=contestant password=whatever admin=no action=create_user”
-
To add SSH keys of contestans to a server:
ansible-playbook -i inventory authorized_key.yml -u "$USER" -k
-
To distribute key pair over contestant machines
ansible-playbook key_distribution.yml -i hosts_stage