From 5d89d2fabc260ab0d0594d3688ca279fdcc249aa Mon Sep 17 00:00:00 2001 From: binary Date: Thu, 14 Jan 2021 17:51:48 +0100 Subject: Add jenkins role --- roles/jenkins/tasks/main.yml | 27 +++++++++++++++++++++++++++ roles/jenkins/vars/main.yml | 8 ++++++++ 2 files changed, 35 insertions(+) create mode 100644 roles/jenkins/tasks/main.yml create mode 100644 roles/jenkins/vars/main.yml (limited to 'roles') diff --git a/roles/jenkins/tasks/main.yml b/roles/jenkins/tasks/main.yml new file mode 100644 index 0000000..cac34e6 --- /dev/null +++ b/roles/jenkins/tasks/main.yml @@ -0,0 +1,27 @@ + +# jenkins ~~ roles/jenkins/tasks/main.yml +# jenkins setup + +--- + +- name: install jenkins + package: + name: jenkins + state: present + +- name: ensure jenkins group exists + group: + name: "{{ jenkins_group }}" + state: present + +- name: ensure jenkins user exists + user: + name: "{{ jenkins_user }}" + group: "{{ jenkins_group }}" + state: present + +- name: start and enable jenkins service + service: + name: jenkins + state: restarted + enabled: true diff --git a/roles/jenkins/vars/main.yml b/roles/jenkins/vars/main.yml new file mode 100644 index 0000000..7596f1d --- /dev/null +++ b/roles/jenkins/vars/main.yml @@ -0,0 +1,8 @@ + +# jenkins ~~ roles/jenkins/vars/main.yml +# jenkins variables + +--- + +jenkins_group: jenkins +jenkins_user: jenkins -- cgit v1.2.3