mirror of https://github.com/easzlab/kubeasz.git
40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
# 系统基础软件环境
|
|
- import_tasks: debian.yml
|
|
when: ansible_distribution == "Ubuntu" or ansible_distribution == "Debian"
|
|
|
|
- import_tasks: centos.yml
|
|
when: ansible_distribution == "CentOS" or ansible_distribution == "RedHat"
|
|
|
|
# 公共系统参数设置
|
|
- import_tasks: common.yml
|
|
|
|
- name: prepare some dirs
|
|
file: name={{ item }} state=directory
|
|
with_items:
|
|
- "{{ bin_dir }}"
|
|
- "{{ ca_dir }}"
|
|
|
|
- name: 分发证书工具 CFSSL
|
|
copy: src={{ base_dir }}/bin/{{ item }} dest={{ bin_dir }}/{{ item }} mode=0755
|
|
with_items:
|
|
- cfssl
|
|
- cfssl-certinfo
|
|
- cfssljson
|
|
|
|
- name: 本地设置 bin 目录权限
|
|
file: path={{ base_dir }}/bin state=directory mode=0755 recurse=yes
|
|
connection: local
|
|
run_once: true
|
|
|
|
- name: 本地创建 easzctl 工具的软连接
|
|
file: src={{ base_dir }}/tools/easzctl dest=/usr/bin/easzctl state=link
|
|
connection: local
|
|
run_once: true
|
|
|
|
- name: 写入环境变量$PATH
|
|
lineinfile:
|
|
dest: ~/.bashrc
|
|
state: present
|
|
regexp: 'kubeasz'
|
|
line: 'export PATH={{ bin_dir }}:$PATH # generated by kubeasz'
|