使用Ansible在CentOS7上安装Jenkins
这是Jenkins Advent Calendar第七天的文章。
這次將解釋如何使用Ansible在CentOS7上安裝Jenkins的示例。
使用Ansible Playbook
- ansible-playbooks-centos7/jenkins_install – GitHub
安装步骤
git clone https://github.com/ansible-playbooks-centos7/jenkins_install.git
cd jenkins_install
ansible-galaxy install -r roles/requirements.yml
ansible-playbook -i localhost, -c local install.yml
Ansible变量文件的设置示例
可以从每个Ansible Role的页面中确认
引导程序
- robertdebock/ansible-role-bootstrap: Prepare your system to be managed by Ansible. – GitHub
Docker – Docker容器化平台
- geerlingguy/ansible-role-docker – GitHub
Epel
- robertdebock/ansible-role-epel: Install epel on your system. – GitHub
Git是一种分布式版本控制系统。
- geerlingguy/ansible-role-git – GitHub
地方
- robertdebock/ansible-role-locale: Configure locale on your system. – GitHub
Java – 只需一种选项,以中文原生方式解释:
- geerlingguy/ansible-role-java – GitHub
Jenkins
- geerlingguy/ansible-role-jenkins – GitHub
派普
- geerlingguy/ansible-role-pip – GitHub