Skip to content

Commit

Permalink
fix jq安装错误,补充ipset和ipvsadm安装
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmzj committed Aug 26, 2018
1 parent f90cc8a commit 1680235
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/guide/harbor.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mv docker-compose-Linux-x86_64 /etc/ansible/bin/docker-compose
```
2. 在deploy节点下载最新的 [harbor](https://github.com/vmware/harbor/releases) 离线安装包,把它放到项目 `/etc/ansible/down` 目录下,也可以从分享的百度云盘下载

3. 由于ansible解压的一些问题,需要将官方的tgz包,重新打包为zip包(百度云分享的harbor离线包已经重新打包为zip格式)
3. 由于ansible解压的一些问题,需要将官方的tgz包,重新打包为zip包

4. 在deploy节点编辑/etc/ansible/hosts文件,可以参考 `example`目录下的模板,修改部分举例如下

Expand Down
24 changes: 11 additions & 13 deletions roles/prepare/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- "{{ bin_dir }}"
- "{{ ca_dir }}"
- /root/.kube
- /etc/docker

- name: 写入环境变量$PATH
lineinfile:
Expand Down Expand Up @@ -33,15 +32,6 @@
- lxcfs
- lxc-common

# 安装通用软件包
- name: 安装系统通用软件
package: name={{ item }} state=latest
with_items:
- jq # 轻量JSON处理程序,安装docker查询镜像需要
- socat # 用于port forwarding
- bash-completion # bash命令补全工具,需要重新登录服务器生效
- rsync # 文件同步工具,分发证书等配置文件需要

# Ubuntu 安装基础软件包
- name: 安装 ubuntu基础软件
when: ansible_distribution == "Ubuntu"
Expand All @@ -66,9 +56,6 @@
with_items:
- psmisc # 安装psmisc 才能使用命令killall,它在keepalive的监测脚本中使用到
- nfs-utils # 挂载nfs 共享文件需要 (创建基于 nfs的PV 需要)
- net-tools
- ipset
- ipvsadm
- name: 临时关闭 selinux
shell: "setenforce 0"
failed_when: false
Expand All @@ -79,6 +66,17 @@
line: "SELINUX=disabled"
when: ansible_distribution == "CentOS"

# 安装通用软件包
- name: 安装系统通用软件
package: name={{ item }} state=latest
with_items:
- jq # 轻量JSON处理程序,安装docker查询镜像需要
- socat # 用于port forwarding
- bash-completion # bash命令补全工具,需要重新登录服务器生效
- rsync # 文件同步工具,分发证书等配置文件需要
- ipset
- ipvsadm

- name: 安装kubeconfig配置文件
synchronize: src=/root/.kube/config dest=/root/.kube/config
delegate_to: "{{ groups.deploy[0] }}"
Expand Down

0 comments on commit 1680235

Please sign in to comment.