The comment on line 33 actually explains what the jenkins_job and template do below it. I am adding more details though.