Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some small changed I needed to do manually when adding the new Jenkins worker #102

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ansible/group_vars/jenkins.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
---
miniconda_prefix: /scratch/miniconda
jenkins_public_ssh_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfQrCU7MkCPHoFt6kwBnh3kZMd38WMbP4TSmaYrRjqwNAqlW9zoyHMy/eU+Gvb87hjSm9EZG8GOoHAkkqy1s7G6qQWNfYoxyQmbxs/nj3mtvFRKfow8WUmt2Xew5tXWJX1GxWtpyNn4ytrB7iGJRyiGN1R/g6qyBu/rxWtVvWxz79THajJqt5zgJFvnnLDOj9wlUIdA6lXlMOE0fUzdXsBNhZGWMwMCo+hd3i+SHsuK5QvBGPz/c9SdfzyKfg8JFmb2dfMCfybhsAeGO315qZWe1t7fgwVYiFRcOvTpZ0SR7sFPfmEAzm4sIF10n1EIADB70tfmsWsPX42oC/l4Zp1"
software_groups_to_install:
- admin
- editors
- terminals
- utils
31 changes: 21 additions & 10 deletions ansible/jenkins.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
---
- hosts: jenkins

vars:
jenkins_public_ssh_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfQrCU7MkCPHoFt6kwBnh3kZMd38WMbP4TSmaYrRjqwNAqlW9zoyHMy/eU+Gvb87hjSm9EZG8GOoHAkkqy1s7G6qQWNfYoxyQmbxs/nj3mtvFRKfow8WUmt2Xew5tXWJX1GxWtpyNn4ytrB7iGJRyiGN1R/g6qyBu/rxWtVvWxz79THajJqt5zgJFvnnLDOj9wlUIdA6lXlMOE0fUzdXsBNhZGWMwMCo+hd3i+SHsuK5QvBGPz/c9SdfzyKfg8JFmb2dfMCfybhsAeGO315qZWe1t7fgwVYiFRcOvTpZ0SR7sFPfmEAzm4sIF10n1EIADB70tfmsWsPX42oC/l4Zp1"
software_groups_to_install:
- admin
- editors
- terminals
- utils

vars_files:
- "group_vars/all.yml"
- "group_vars/java.yml"
Expand Down Expand Up @@ -45,6 +36,8 @@
- libcurl-devel
- python-devel
- rsync
- java-17-openjdk
- python3.9
state: present
become: true
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int == 9
Expand All @@ -53,6 +46,19 @@
name: python
path: /usr/bin/python3
link: /usr/bin/python
- name: Get Java version name
ansible.builtin.find:
path: /usr/lib/jvm
recurse: false
pattern: 'java-17-openjdk-17*'
register: java17
- name: Create a symbolic link for Java for Jenkins
ansible.builtin.file:
src: "{{ java17.files[0].path }}"
dest: /usr/lib/jvm/java-17-openjdk
owner: root
group: root
state: link
- name: Ensure SELinux is set to enforcing mode
ansible.builtin.lineinfile:
path: /etc/selinux/config
Expand All @@ -64,7 +70,7 @@
ansible.builtin.alternatives:
name: java
link: /usr/bin/java
path: /usr/lib/jvm/java-11-openjdk/bin/java
path: /usr/lib/jvm/java-17-openjdk/bin/java

- name: Download packer
ansible.builtin.command: yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
Expand All @@ -84,6 +90,11 @@
user: centos
state: present
key: "{{ jenkins_public_ssh_key }}"
- name: DNF Autoremove
ansible.builtin.dnf:
autoremove: yes
enablerepo: "*"
when: ansible_os_family == 'RedHat'

roles:
- role: usegalaxy_eu.handy.os_setup
Expand Down