Skip to content

Instantly share code, notes, and snippets.

@nasirhm
Created December 8, 2019 08:15
Show Gist options
  • Save nasirhm/ae5844b856156a26efa57cd86fe2dcad to your computer and use it in GitHub Desktop.
Save nasirhm/ae5844b856156a26efa57cd86fe2dcad to your computer and use it in GitHub Desktop.
---
- name: Installing Jenkins by Ansible automation
hosts: codein_fedora_boxes
tasks:
- name: Downloading Jenkins from yum repo
get_url:
url: "https://pkg.jenkins.io/redhat-stable/jenkins.repo"
dest: /etc/yum.repos.d/jenkins.repo
become: true
- name: GPG Key
rpm_key:
state: present
key: https://pkg.jenkins.io/redhat-stable/jenkins.io.key
- name: Install Jenkins
dnf:
name: jenkins
state: present
- name: start jenkins
systemd:
name: jenkins
state: started
- name: enable jenkins
systemd:
name: jenkins
enabled: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment