kubeasz/roles/chrony/tasks/offline.yml

71 lines
2.4 KiB
YAML
Raw Normal View History

2019-06-28 10:50:36 +08:00
# 离线安装 chrony
- name: 准备离线安装包目录
file: name=/opt/kube/packages/chrony state=directory
2019-07-16 22:47:53 +08:00
# ubuntu 1604
2019-06-28 10:50:36 +08:00
- block:
- name: 分发 chrony_xenial 离线包
copy:
src: "{{ base_dir }}/down/packages/chrony_xenial.tar.gz"
dest: "/opt/kube/packages/chrony/chrony_xenial.tar.gz"
- name: 安装 chrony_xenial 离线包
shell: 'cd /opt/kube/packages/chrony && tar zxf chrony_xenial.tar.gz && \
dpkg -i *.deb > /tmp/install_chrony.log 2>&1'
when: ansible_distribution_release == "xenial"
2019-06-29 18:10:51 +08:00
ignore_errors: true
2019-06-28 10:50:36 +08:00
2019-07-16 22:47:53 +08:00
# ubuntu 1804
- block:
- name: 分发 chrony_bionic 离线包
copy:
src: "{{ base_dir }}/down/packages/chrony_bionic.tar.gz"
dest: "/opt/kube/packages/chrony/chrony_bionic.tar.gz"
- name: 安装 chrony_bionic 离线包
shell: 'cd /opt/kube/packages/chrony && tar zxf chrony_bionic.tar.gz && \
dpkg -i *.deb > /tmp/install_chrony.log 2>&1'
when: ansible_distribution_release == "bionic"
ignore_errors: true
2019-07-16 22:47:53 +08:00
# centos7
2019-06-28 10:50:36 +08:00
- block:
- name: 分发 chrony_centos7 离线包
copy:
src: "{{ base_dir }}/down/packages/chrony_centos7.tar.gz"
dest: "/opt/kube/packages/chrony/chrony_centos7.tar.gz"
- name: 安装 chrony_centos7 离线包
shell: 'cd /opt/kube/packages/chrony && tar zxf chrony_centos7.tar.gz && \
2019-06-29 18:10:51 +08:00
rpm -Uvh --force --nodeps *.rpm > /tmp/install_chrony.log 2>&1'
2019-06-28 10:50:36 +08:00
when:
- 'ansible_distribution_major_version == "7"'
- 'ansible_distribution == "CentOS"'
2019-06-29 18:10:51 +08:00
ignore_errors: true
2019-07-16 22:47:53 +08:00
# debian9
- block:
- name: 分发 chrony_stretch 离线包
copy:
src: "{{ base_dir }}/down/packages/chrony_stretch.tar.gz"
dest: "/opt/kube/packages/chrony/chrony_stretch.tar.gz"
- name: 安装 chrony_stretch 离线包
shell: 'cd /opt/kube/packages/chrony && tar zxf chrony_stretch.tar.gz && \
dpkg -i *.deb > /tmp/install_chrony.log 2>&1'
when: ansible_distribution_release == "stretch"
ignore_errors: true
2019-07-18 15:15:57 +08:00
# debian10
- block:
- name: 分发 chrony_buster 离线包
copy:
src: "{{ base_dir }}/down/packages/chrony_buster.tar.gz"
dest: "/opt/kube/packages/chrony/chrony_buster.tar.gz"
- name: 安装 chrony_buster 离线包
shell: 'cd /opt/kube/packages/chrony && tar zxf chrony_buster.tar.gz && \
dpkg -i *.deb > /tmp/install_chrony.log 2>&1'
when: ansible_distribution_release == "buster"
ignore_errors: true