Commit 3ce57190 authored by nanahira's avatar nanahira

updates for fedora

parent 99a9abd4
......@@ -2,12 +2,12 @@
become: true
apt:
update_cache: true
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,build-essential,p7zip-full,p7zip-rar,xclip,astyle,python3-setuptools,python3-dev,python3-pip,tcpdump,rsync,htop,locales,mtr,dnsutils,net-tools,traceroute,tar,unzip,iperf,iperf3,nmap,mosh,subversion,nfs-common,fish,haveged
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,build-essential,p7zip-full,p7zip-rar,xclip,astyle,python3-setuptools,python3-dev,python3-pip,tcpdump,rsync,htop,locales,mtr,dnsutils,net-tools,traceroute,tar,unzip,iperf,iperf3,nmap,mosh,subversion,nfs-common,fish,haveged,ipset
- name: ctags in old Ubuntu
become: true
apt:
name: exuberant-ctags
when: "ansible_distribution == 'Ubuntu' and ansible_distribution_release|lower != 'focal'"
when: "ansible_distribution == 'Ubuntu' and ansible_distribution_release != 'focal'"
- name: remove old ctags
become: true
apt:
......@@ -15,17 +15,17 @@
state: absent
purge: true
autoremove: true
when: "ansible_distribution == 'Debian' or ansible_distribution_release|lower == 'focal'"
when: "ansible_distribution == 'Debian' or ansible_distribution_release == 'focal'"
- name: ctags in new Ubuntu and Debian
become: true
apt:
name: universal-ctags
when: "ansible_distribution == 'Debian' or ansible_distribution_release|lower == 'focal'"
- name: Focal packages
when: "ansible_distribution == 'Debian' or ansible_distribution_release == 'focal'"
- name: focal packages
become: true
apt:
name: python-is-python3,wireguard
when: ansible_distribution_release|lower == 'focal'
when: ansible_distribution_release == 'focal'
- name: open vm tools
become: true
apt:
......
......@@ -6,12 +6,12 @@
- 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-utils # 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,ipset # nfs-common,fish
update_cache: yes
- name: Fish for Fedora
- name: Fedora packages
become: true
dnf:
name: fish
name: fish,wireguard-tools
when: ansible_distribution == 'Fedora'
- name: open vm tools
become: true
......
......@@ -13,46 +13,46 @@
state: absent
autoremove: yes
purge: yes
when: ansible_os_family == 'Debian' and ansible_distribution_release|lower != 'focal'
- name: clean apt Docker for Focal
when: ansible_os_family == 'Debian' and ansible_distribution_release != 'focal'
- name: clean apt Docker for focal
become: true
apt:
name: docker-ce,docker-ee
state: absent
autoremove: yes
purge: yes
when: ansible_os_family == 'Debian' and ansible_distribution_release|lower == 'focal'
when: ansible_os_family == 'Debian' and ansible_distribution_release == 'focal'
- name: Docker apt 源公钥
become: true
apt_key:
url: '{{mirror_docker}}/linux/{{ ansible_distribution|lower }}/gpg'
when: ansible_os_family == 'Debian' and ansible_distribution_release|lower != 'focal'
when: ansible_os_family == 'Debian' and ansible_distribution_release != 'focal'
- name: Docker apt 源
become: true
apt_repository:
repo: 'deb [arch=amd64] {{mirror_docker}}/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable'
filename: docker
when: ansible_os_family == 'Debian' and ansible_distribution_release|lower != 'focal'
when: ansible_os_family == 'Debian' and ansible_distribution_release != 'focal'
- name: Docker apt 源
become: true
apt_repository:
repo: 'deb [arch=amd64] {{mirror_docker}}/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable'
filename: docker
state: absent
when: ansible_os_family == 'Debian' and ansible_distribution_release|lower == 'focal'
when: ansible_os_family == 'Debian' and ansible_distribution_release == 'focal'
- name: 安装 Docker (apt)
become: true
apt:
name: docker-ce,python-backports-shutil-get-terminal-size,python-backports.ssl-match-hostname,python-pip
update_cache: yes
when: ansible_os_family == 'Debian' and ansible_distribution_release|lower != 'focal'
when: ansible_os_family == 'Debian' and ansible_distribution_release != 'focal'
notify: restart_docker
- name: 安装 Docker (focal)
become: true
apt:
name: docker.io,python3-pip
update_cache: yes
when: ansible_os_family == 'Debian' and ansible_distribution_release|lower == 'focal'
when: ansible_os_family == 'Debian' and ansible_distribution_release == 'focal'
notify: restart_docker
- name: clean yum Docker
become: true
......@@ -130,7 +130,7 @@
- name: 'use pip3'
set_fact:
pip_executable: pip3
when: ansible_os_family == 'RedHat' or ansible_distribution_release|lower == 'focal'
when: ansible_os_family == 'RedHat' or ansible_distribution_release == 'focal'
- name: docker-compose pip
become: true
pip:
......
......@@ -24,4 +24,4 @@
src: /usr/share/fish/vendor_completions.d/docker.fish
dest: '~/.config/fish/completions/docker.fish'
remote_src: yes
when: install_docker and ansible_distribution_release|lower != 'focal'
when: install_docker and ansible_distribution_release != 'focal' and ansible_distribution != 'Fedora'
......@@ -16,3 +16,11 @@
state: stopped
enabled: false
ignore_errors: true
- name: disable cockpit on Fedora
become: true
systemd:
name: cockpit
state: stopped
enabled: false
ignore_errors: true
when: ansible_distribution == 'Fedora'
......@@ -111,4 +111,4 @@
file:
path: '/etc/apt/sources.list.d/wireguard-ubuntu-wireguard-{{ ansible_distribution_release|lower }}.list'
state: absent
when: ansible_distribution == 'Ubuntu' and (upgrade or ansible_distribution_release|lower == 'focal')
when: ansible_distribution == 'Ubuntu' and (upgrade or ansible_distribution_release == 'focal')
......@@ -5,7 +5,7 @@
- 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,nfs-utils # astyle
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,ipset # astyle
update_cache: yes
- name: open vm tools
become: true
......
{
{% if ansible_distribution == "Fedora" %}
{% if registry is defined %}
"registry-mirrors": [
"{{registry}}"
]
{% endif %}
{% else %}
{% if registry is defined %}
"registry-mirrors": [
"{{registry}}"
],
{% endif %}
"live-restore": true
{% endif %}
}
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