Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmzj committed Mar 29, 2018
1 parent 51caf57 commit 566a374
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
5 changes: 5 additions & 0 deletions docs/guide/nfs-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ Ubuntu 16.04,首先需要安装 `nfs-common` 包
``` bash
apt install nfs-common
```
CentOS 7, 需要安装 `nfs-utils`

``` bash
yum install nfs-utils
```

使用 mount 命令来挂载其他机器共享的 NFS 目录。可以在终端提示符后输入以下类似的命令:

Expand Down
16 changes: 1 addition & 15 deletions roles/docker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,7 @@
shell: systemctl daemon-reload && systemctl enable docker && systemctl restart docker

## 可选 ------安装docker查询镜像 tag的小工具----
# 先拉取下节点的ansible setup信息,起到缓存效果,否则后续when 判断可能失败
- name: 缓存ansilbe setup信息
setup: gather_subset=min
tags: docker-tag

- name: apt安装轻量JSON处理程序
apt: name=jq state=latest
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "16"
tags: docker-tag

- name: yum安装轻量JSON处理程序
yum: name=jq state=latest
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
tags: docker-tag

# 先要安装轻量JSON处理程序‘jq’,已在 prepare 节点安装
- name: 下载 docker-tag
copy: src=docker-tag dest={{ bin_dir }}/docker-tag mode=0755
tags: docker-tag
17 changes: 12 additions & 5 deletions roles/prepare/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@
- lxcfs
- lxc-common

# Ubuntu 安装基础软件包
- name: 安装 ubuntu基础软件
when: ansible_distribution == "Ubuntu"
apt: name={{ item }} state=latest
with_items:
- jq # 轻量JSON处理程序,安装docker查询镜像需要
- nfs-common # 挂载nfs 共享文件需要 (创建基于 nfs的PV 需要)

- block:
- name: 删除centos默认安装
yum: name={{ item }} state=absent
Expand All @@ -52,12 +60,11 @@
- python-firewall
- firewalld-filesystem
- name: 安装基础软件包
yum: name={{ item }} state=installed
yum: name={{ item }} state=latest
with_items:
- vim
- git
- wget
- psmisc # 安装psmisc 才能使用命令killall,它在keepalive的监测脚本中使用到
- jq # 轻量JSON处理程序,安装docker查询镜像需要
- psmisc # 安装psmisc 才能使用命令killall,它在keepalive的监测脚本中使用到
- nfs-utils # 挂载nfs 共享文件需要 (创建基于 nfs的PV 需要)
- net-tools
- bash-completion
- name: 临时关闭 selinux
Expand Down

0 comments on commit 566a374

Please sign in to comment.