This is a rough skeleton of the ansible used to deploy RISELab/Apache Spark Jenkins build workers on Ubuntu 20LTS.
WARNING: this will not work “directly out of the box” and will need to be tweaked to work on any ubuntu servers you might want to try this on.
all of the configs for the workers live in roles/common/... and roles/jenkins-worker...
hosts
file~/.ansible.cfg
: [defaults] host_key_checking = False
ansible-playbook -u <service account> deploy-jenkins-worker.yml -i <ansible-style-hosts-file> -k -b -K
tips:
apt-get remove <application_name>
and apt-get purge <package-name>
are your friends