ansible-jenkins

Ansible playbook: Jenkins

  • 所有者: ICTO/ansible-jenkins
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Readme

Description

ansible-jenkins is an Ansible role.
Use this role to install Jenkins and install/update plugins.

Provides

  1. Latest Jenkins server
  2. Jenkins plugins support

Requires

  1. Ansible 2.2 or higher
  2. Debian 8, Ubuntu 14, CentOS 7, FreeBSD 10 or later
  3. Vagrant (optional)

Usage

Install from Ansible Galaxy

$ ansible-galaxy install flyapen.jenkins

Or download manually

$ git clone https://github.com/ICTO/ansible-jenkins.git roles

The code should reside in the roles directory of ansible ( See ansible documentation for more information on roles ), in a folder jenkins.

Create a host file

Following example make ansible aware of the Vagrant box reachable on localhost port 2222.

$ vi ansible.host

with

[jenkins]
127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key

Create host specific variables

Make the host_vars directory where ansible.host file is located.

$ mkdir host_vars

Create a file in the newly created directory matching your host.

$ cd host_vars
$ vi 127.0.0.1

with

---
plugins:
  - 'ldap'
  - 'github'
  - 'translation'
  - 'preSCMbuildstep'
email:
  smtp_host: 'mail.example.com'
  smtp_ssl: 'true'
  default_email_suffix: '@example.com'
#jenkins_admin_user: admin
#jenkins_admin_password: admin

Take a look at the defaults/main.yml file which contains all possible variables.

Run the playbook

First create a playbook including the jenkins role, naming it jenkins.yml.

- name: Jenkins
  hosts: jenkins
  roles:
    # install jenkins
    - { role: jenkins, become: yes, become_user: root }

Use ansible.host as inventory. Run the playbook only for the remote host jenkins. Use vagrant as the SSH user to connect to the remote host. -k enables the SSH password prompt.

$ ansible-playbook -i ansible.host jenkins.yml

主要指標

概覽
名稱與所有者ICTO/ansible-jenkins
主編程語言Groovy
編程語言Groovy (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2013-03-05 10:06:44
推送於2020-09-30 18:41:15
最后一次提交
發布數4
最新版本名稱v1.2.0 (發布於 )
第一版名稱pre-role (發布於 2013-10-29 15:52:46)
用户参与
星數281
關注者數28
派生數170
提交數100
已啟用問題?
問題數20
打開的問題數8
拉請求數29
打開的拉請求數3
關閉的拉請求數13
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?