2018-09-02 14:08:51 +08:00
|
|
|
|
# 删除默认安装
|
|
|
|
|
- name: 删除ubuntu默认安装
|
|
|
|
|
apt: name={{ item }} state=absent
|
|
|
|
|
with_items:
|
|
|
|
|
- ufw
|
|
|
|
|
- lxd
|
|
|
|
|
- lxd-client
|
|
|
|
|
- lxcfs
|
|
|
|
|
- lxc-common
|
|
|
|
|
|
|
|
|
|
# Ubuntu 安装基础软件包
|
|
|
|
|
- name: 安装 ubuntu基础软件
|
|
|
|
|
apt: name={{ item }} state=latest
|
|
|
|
|
with_items:
|
|
|
|
|
- nfs-common # 挂载nfs 共享文件需要 (创建基于 nfs的PV 需要)
|
|
|
|
|
- conntrack # network connection cleanup 用到
|
|
|
|
|
- jq # 轻量JSON处理程序,安装docker查询镜像需要
|
|
|
|
|
- socat # 用于port forwarding
|
|
|
|
|
- bash-completion # bash命令补全工具,需要重新登录服务器生效
|
|
|
|
|
- rsync # 文件同步工具,分发证书等配置文件需要
|
|
|
|
|
- ipset
|
|
|
|
|
- ipvsadm
|
|
|
|
|
|
|
|
|
|
- name: 设置 ulimits
|
|
|
|
|
lineinfile:
|
|
|
|
|
dest: /etc/profile
|
|
|
|
|
regexp: "ulimit -SHn"
|
|
|
|
|
line: "ulimit -SHn 65535"
|
|
|
|
|
|
2018-09-02 15:07:58 +08:00
|
|
|
|
- name: 设置 ulimits2
|
|
|
|
|
template: src=30-kubeasz.conf.j2 dest=/etc/security/limits.d/30-kubeasz.conf
|