Remove jenkins hosts

This commit is contained in:
Timo Makinen 2022-10-27 20:36:41 +00:00
parent b087f70f0c
commit b128852405
9 changed files with 0 additions and 128 deletions

View file

@ -1,8 +0,0 @@
---
datadisks:
- {size: 100}
firewall_in:
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}

View file

@ -1,6 +0,0 @@
---
vmhost: vmhost01.home.foo.sh
network_interfaces:
- device: eth0
vlan: 20
mac: "52:54:00:ac:dc:47"

View file

@ -23,9 +23,6 @@ git:
influxdb: influxdb:
hosts: hosts:
influxdb01.home.foo.sh: influxdb01.home.foo.sh:
jenkins:
hosts:
jenkins01.home.foo.sh:
ldap: ldap:
hosts: hosts:
ldap01.home.foo.sh: ldap01.home.foo.sh:
@ -110,7 +107,6 @@ webservers:
adm: adm:
collab: collab:
git: git:
jenkins:
ldap: ldap:
mirror: mirror:
munin: munin:
@ -143,7 +139,6 @@ rocky8:
collab: collab:
git: git:
influxdb: influxdb:
jenkins:
ldap: ldap:
minecraft: minecraft:
mirror: mirror:

View file

@ -1,25 +0,0 @@
---
- import_playbook: "include/deploy-kvm-guest.yml myhosts=jenkins"
- name: configure instance
hosts: jenkins
user: root
gather_facts: true
pre_tasks:
- name: mount /export
mount:
name: /export
src: LABEL=/export
fstype: xfs
opts: noatime,noexec,nosuid,nodev
passno: "0"
dump: "0"
state: mounted
vars_files:
- "{{ ansible_private }}/vars.yml"
roles:
- base
- jenkins

View file

@ -65,9 +65,6 @@
- role: nginx/site - role: nginx/site
site: iot.foo.sh site: iot.foo.sh
redirect: https://www.foo.sh/ redirect: https://www.foo.sh/
- role: nginx/site
site: jenkins.foo.sh
proxy: https://jenkins01.home.foo.sh/
- role: nginx/site - role: nginx/site
site: munin.foo.sh site: munin.foo.sh
proxy: https://munin01.home.foo.sh/ proxy: https://munin01.home.foo.sh/

View file

@ -1,5 +0,0 @@
---
- name: restart jenkins
service:
name: jenkins
state: restarted

View file

@ -1,3 +0,0 @@
---
dependencies:
- {role: nginx/server}

View file

@ -1,72 +0,0 @@
---
- name: add jenkins repository
yum_repository:
name: jenkins
description: Jenkins stable
baseurl: https://pkg.jenkins.io/redhat-stable
gpgcheck: true
gpgkey: https://pkg.jenkins.io/redhat-stable/jenkins.io.key
- name: install packages
package:
name: "{{ item }}"
state: installed
with_items:
- jenkins
- java-11-openjdk
- name: listen only to localhost
lineinfile:
path: /etc/sysconfig/jenkins
regexp: "^JENKINS_LISTEN_ADDRESS=.*"
line: "JENKINS_LISTEN_ADDRESS=localhost"
notify: restart jenkins
- name: configure data directory
lineinfile:
path: /etc/sysconfig/jenkins
regexp: "^JENKINS_HOME=.*"
line: "JENKINS_HOME=/srv/jenkins"
notify: restart jenkins
- name: create data directory
file:
path: /export/jenkins
state: directory
mode: 0750
owner: jenkins
group: jenkins
- name: link data directory
file:
dest: /srv/jenkins
src: /export/jenkins
state: link
owner: root
group: "{{ ansible_wheel }}"
follow: false
force: true
- name: enable service
service:
name: jenkins
state: started
enabled: true
- name: allow nginx to connect jenkins
seboolean:
name: httpd_can_network_connect
state: true
persistent: true
- name: create nginx config
copy:
dest: "/etc/nginx/conf.d/{{ inventory_hostname }}/jenkins.conf"
content: |
location / {
proxy_pass http://localhost:8080/;
}
mode: 0644
owner: root
group: "{{ ansible_wheel }}"
notify: restart nginx

View file

@ -5,7 +5,6 @@
- import_playbook: playbooks/fsol-gw.yml - import_playbook: playbooks/fsol-gw.yml
- import_playbook: playbooks/git.yml - import_playbook: playbooks/git.yml
- import_playbook: playbooks/influxdb.yml - import_playbook: playbooks/influxdb.yml
- import_playbook: playbooks/jenkins.yml
- import_playbook: playbooks/ldap.yml - import_playbook: playbooks/ldap.yml
- import_playbook: playbooks/log.yml - import_playbook: playbooks/log.yml
- import_playbook: playbooks/mail.yml - import_playbook: playbooks/mail.yml