# Readme
## Description
*ansible-jenkins* is an [Ansible](http://ansible.cc) role.
Use this role to install Jenkins and install/update plugins.
## Provides
1. Latest Jenkins server
2. Jenkins plugins support
## Requires
1. Ansible 1.4 or higher
2. Debian 7.3 (other deb-based distros should work too)
3. Vagrant (optional)
## Usage
### Get the code
```bash
$ git clone https://github.com/ICTO/ansible-jenkins.git roles
```
The code should reside in the roles directory of ansible ( See [ansible documentation](http://www.ansibleworks.com/docs/playbooks.html#roles) 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.
```bash
$ vi ansible.host
```
with
```ini
[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.
```bash
$ mkdir host_vars
```
Create a file in the newly created directory matching your host.
```bash
$ cd host_vars
$ vi 127.0.0.1
```
with
```yaml
---
plugins:
- 'ldap'
- 'github'
- 'translation'
- 'preSCMbuildstep'
port: 8081
prefix: '/build'
email:
smtp_host: 'mail.example.com'
smtp_ssl: 'true'
default_email_suffix: '@example.com'
```
### Run the playbook
First create a playbook including the jenkins role, naming it jenkins.yml.
```yml
- name: Jenkins
hosts: jenkins
sudo: yes
roles:
- ansible-jenkins
```
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.
```bash
$ ansible-playbook -i ansible.host jenkins.yml
```
### Example output
```
SSH password:
PLAY [Jenkins] ****************************************************************
GATHERING FACTS ***************************************************************
ok: [127.0.0.1]
TASK: [ansible-jenkins | Install python-software-properties] ******************
ok: [127.0.0.1]
TASK: [ansible-jenkins | Add jenkins apt-key] *********************************
ok: [127.0.0.1]
TASK: [ansible-jenkins | Add Jenkins repository] ******************************
ok: [127.0.0.1]
TASK: [ansible-jenkins | Install dependencies] ********************************
ok: [127.0.0.1] => (item=openjdk-6-jre)
ok: [127.0.0.1] => (item=openjdk-6-jdk)
ok: [127.0.0.1] => (item=git)
ok: [127.0.0.1] => (item=curl)
TASK: [ansible-jenkins | Install Jenkins] *************************************
ok: [127.0.0.1]
TASK: [ansible-jenkins | 10s delay while starting Jenkins] ********************
skipping: [127.0.0.1]
TASK: [ansible-jenkins | Create Jenkins CLI destination directory: /opt/jenkins] ***
ok: [127.0.0.1]
TASK: [ansible-jenkins | Get Jenkins CLI] *************************************
ok: [127.0.0.1]
TASK: [ansible-jenkins | Get Jenkins updates] *********************************
ok: [127.0.0.1]
TASK: [ansible-jenkins | Update-center Jenkins] *******************************
skipping: [127.0.0.1]
TASK: [ansible-jenkins | List plugins] ****************************************
skipping: [127.0.0.1]
TASK: [ansible-jenkins | Install/update plugins] ******************************
skipping: [127.0.0.1] => (item=plugins)
TASK: [ansible-jenkins | List plugins to be updated] **************************
changed: [127.0.0.1]
TASK: [ansible-jenkins | Update plugins] **************************************
skipping: [127.0.0.1]
PLAY RECAP ********************************************************************
127.0.0.1 : ok=11 changed=1 unreachable=0 failed=0
```
没有合适的资源?快使用搜索试试~ 我知道了~
python web 开发实战 基础学习文档
共427个文件
py:244个
html:28个
yml:14个
需积分: 8 1 下载量 23 浏览量
2023-04-04
17:28:22
上传
评论
收藏 57.25MB ZIP 举报
温馨提示
python web 开发实战 基础学习文档 + 对应的 代码 ,对刚学习的 python web 的 人 有很快的帮助
资源推荐
资源详情
资源评论
收起资源包目录
python web 开发实战 基础学习文档 (427个子文件)
192.168.0.130 160B
a-2016-06-30_00000.bz2 69B
c-2016-06-30_00000.bz2 69B
d-2016-06-30_00000.bz2 67B
b-2016-06-30_00000.bz2 67B
levenshtein_c.c 113KB
levenshtein_cy2.c 103KB
levenshtein_cy.c 102KB
levenshtein.c 102KB
hello.c 89KB
ceil.c 66KB
ceil_cy.c 65KB
_board.c 21KB
_add.c 18KB
_api_out.c 17KB
board.c 297B
celery 0B
celery 0B
haproxy.cfg 2KB
nginx_gunicorn.conf 2KB
nginx_uwsgi.conf 2KB
supervisord.conf 1KB
keepalived_lvs_director_primary.conf 1KB
keepalived_lvs_director_secondary.conf 1KB
supervisord_global2.conf 965B
supervisord_global.conf 934B
keepalived_ngx_primary.conf 751B
keepalived_ngx_secondary.conf 713B
upstart.conf 165B
rsyslog_haproxy.conf 108B
keepalived_lvs_primary.conf 0B
bootstrap.min.css 97KB
bootstrap.min.css 97KB
index.css 11KB
all.min.css 4KB
base-min.css 2KB
buttons-min.css 2KB
custom.css 1KB
20160423.csv 353B
statistics.csv 353B
Dockerfile 1KB
.env 51B
click.es6 206B
.galaxy_install_info 60B
.gitattributes 51B
.gitignore 764B
.gitignore 23B
board.h 138B
hello 0B
jenkins.host 23B
Untitled.html 246KB
signin_xhr.html 2KB
signin_fetch.html 2KB
success.html 2KB
signin.html 2KB
index.html 1KB
csv.html 859B
register.html 719B
login_user.html 595B
error50x.html 547B
simple.html 514B
base.html 462B
base.html 434B
simple.html 402B
index.html 390B
index.html 350B
index.html 328B
index.html 308B
hello.html 301B
user.html 192B
macro.html 157B
hello_macro.html 155B
page_filters.html 134B
authenticated-admin.html 108B
users.html 100B
my_filters.html 100B
utils.html 90B
hello.html 17B
web_develop-master.iml 657B
tox.ini 224B
rich-display.ipynb 42KB
double11.ipynb 11KB
echarts.ipynb 4KB
Untitled.ipynb 2KB
redis.conf.j2 5KB
hudson.tasks.Mailer.xml.j2 315B
redis-3.0.conf.jinja 5KB
redis-2.8.conf.jinja 4KB
map.jinja 3KB
index.js 171KB
success.js 166KB
vendors.js 85KB
all.min.js 84KB
jquery.min.js 84KB
jquery.min.js 84KB
fetch.js 11KB
custom.js 1KB
custom.js 1KB
highlight.js 29B
common.js 26B
共 427 条
- 1
- 2
- 3
- 4
- 5
资源评论
放大的EZ
- 粉丝: 849
- 资源: 58
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功