Commit 99a9abd4 authored by nanahira's avatar nanahira

fedora

parent c6fe3193
......@@ -6,7 +6,13 @@
- name: dnf
become: true
dnf:
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,python3-pip,tcpdump,rsync,htop,mtr,net-tools,ctags,astyle,xclip,traceroute,tar,unzip,nmap,python3-libselinux,mosh,subversion,haveged # nfs-common,fish
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,python3-pip,tcpdump,rsync,htop,mtr,net-tools,ctags,astyle,xclip,traceroute,tar,unzip,nmap,python3-libselinux,mosh,subversion,haveged,nfs-utils # nfs-common,fish
update_cache: yes
- name: Fish for Fedora
become: true
dnf:
name: fish
when: ansible_distribution == 'Fedora'
- name: open vm tools
become: true
dnf:
......
......@@ -45,7 +45,6 @@
apt:
name: docker-ce,python-backports-shutil-get-terminal-size,python-backports.ssl-match-hostname,python-pip
update_cache: yes
state: latest
when: ansible_os_family == 'Debian' and ansible_distribution_release|lower != 'focal'
notify: restart_docker
- name: 安装 Docker (focal)
......@@ -53,7 +52,6 @@
apt:
name: docker.io,python3-pip
update_cache: yes
state: latest
when: ansible_os_family == 'Debian' and ansible_distribution_release|lower == 'focal'
notify: restart_docker
- name: clean yum Docker
......@@ -71,7 +69,7 @@
baseurl: '{{mirror_docker}}/linux/{{ ansible_distribution|lower }}/{{ansible_distribution_major_version}}/$basearch/stable'
ip_resolve: 4
gpgkey: '{{mirror_docker}}/linux/{{ ansible_distribution|lower }}/gpg'
when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int != 8
when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int < 8
- name: docker yum 源 (CentOS 8)
become: true
yum_repository:
......@@ -80,19 +78,32 @@
baseurl: '{{mirror_docker}}/linux/centos/7/$basearch/stable'
ip_resolve: 4
gpgkey: '{{mirror_docker}}/linux/7/gpg'
when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int >= 8
when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 8
- name: containerd.io
become: true
dnf:
name: '{{mirror_docker}}/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm'
when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int >= 8
when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 8
- name: 安装 Docker (yum)
become: true
yum:
name: python3-pip,docker-ce,docker-ce-cli,containerd.io
update_cache: yes
state: latest
when: ansible_os_family == 'RedHat'
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int < 8
notify: restart_docker
- name: 安装 Docker (CentOS 8)
become: true
dnf:
name: python3-pip,docker-ce,docker-ce-cli,containerd.io
update_cache: yes
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int == 8
notify: restart_docker
- name: 安装 Docker (Fedora)
become: true
dnf:
name: python3-pip,moby-engine
update_cache: yes
when: ansible_distribution == 'Fedora'
notify: restart_docker
- name: docker user group
become: true
......
......@@ -38,7 +38,7 @@
when: "install_docker"
- name: fish
include_tasks: fish.yml
when: "ansible_os_family == 'Debian'" # RedHat has too many problems on fish, so aborted
when: ansible_os_family == 'Debian' or ansible_distribution == 'Fedora' # RedHat has too many problems on fish, so aborted
- name: customize
include_tasks: '{{item}}.yml'
with_items:
......
......@@ -3,6 +3,7 @@
selinux:
state: disabled
- name: disable selinux
become: true
lineinfile:
path: /etc/selinux/config
regexp: '^SELINUX='
......
......@@ -5,7 +5,8 @@
- name: yum
become: true
yum:
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,python-pip,tcpdump,rsync,htop,mtr,net-tools,ctags,xclip,traceroute,tar,unzip,iperf,iperf3,nmap,libselinux-python,mosh,subversion,fish,haveged,mtr,rsync # astyle # nfs-common
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,python-pip,tcpdump,rsync,htop,mtr,net-tools,ctags,xclip,traceroute,tar,unzip,iperf,iperf3,nmap,libselinux-python,mosh,subversion,fish,haveged,mtr,rsync,nfs-utils # astyle
update_cache: yes
- name: open vm tools
become: true
yum:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment