aboutsummaryrefslogtreecommitdiffstats
path: root/roles/jenkins
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2021-01-14 17:51:48 +0100
committerbinary <me@rgoncalves.se>2021-01-14 17:51:48 +0100
commit5d89d2fabc260ab0d0594d3688ca279fdcc249aa (patch)
tree27eeb6e48be7c44ba7ec7d1cb48df09ced0d4426 /roles/jenkins
parent5e6f92895f11c62565c23a6cbad2dac73118569d (diff)
downloadinfrastructure-5d89d2fabc260ab0d0594d3688ca279fdcc249aa.tar.gz
Add jenkins role
Diffstat (limited to 'roles/jenkins')
-rw-r--r--roles/jenkins/tasks/main.yml27
-rw-r--r--roles/jenkins/vars/main.yml8
2 files changed, 35 insertions, 0 deletions
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
remember that computers suck.