Commit bdf1001d authored by nanahira's avatar nanahira

railgun and xanmod

parent 06b6b28e
Pipeline #2870 failed with stage
in 10 seconds
......@@ -24,6 +24,7 @@ vm_agents_status: present
customization: true
nvidia_driver_version: null
cloud_kernel: auto # or enabled / disabled
xanmod: true
railgun:
destination: chnroute
remoteGatewayId: 31
- name: check RTL8111
shell: 'lspci | grep RTL8111'
register: check_rtl_result
changed_when: false
failed_when: 'check_rtl_result.rc > 1'
- name: install RTL8111 driver
become: true
apt:
name: r8168-dkms
default_release: '{{ target_distribution }}-backports'
when: check_rtl_result.rc == 0 and ansible_distribution_release != 'sid'
- name: install RTL8111 driver for sid
become: true
apt:
name: r8168-dkms
when: check_rtl_result.rc == 0 and ansible_distribution_release == 'sid'
- name: check b43
shell: 'lspci | grep BCM4322'
register: check_b43_result
changed_when: false
failed_when: 'check_b43_result.rc > 1'
- name: install b43 driver
become: true
apt:
name: firmware-b43-installer
when: check_b43_result.rc == 0
- name: remove wireguard-dkms
become: true
apt:
name: wireguard-dkms
state: absent
purge: true
......@@ -22,35 +22,3 @@
update_cache: true
default_release: '{{ target_distribution }}-backports'
when: ansible_distribution_release != 'sid'
- name: check RTL8111
shell: 'lspci | grep RTL8111'
register: check_rtl_result
changed_when: false
failed_when: 'check_rtl_result.rc > 1'
- name: install RTL8111 driver
become: true
apt:
name: r8168-dkms
default_release: '{{ target_distribution }}-backports'
when: check_rtl_result.rc == 0 and ansible_distribution_release != 'sid'
- name: install RTL8111 driver for sid
become: true
apt:
name: r8168-dkms
when: check_rtl_result.rc == 0 and ansible_distribution_release == 'sid'
- name: check b43
shell: 'lspci | grep BCM4322'
register: check_b43_result
changed_when: false
failed_when: 'check_b43_result.rc > 1'
- name: install b43 driver
become: true
apt:
name: firmware-b43-installer
when: check_b43_result.rc == 0
- name: remove wireguard-dkms
become: true
apt:
name: wireguard-dkms
state: absent
purge: true
- name: install xanmod
include_tasks: 'xanmod.yml'
when: xanmod and ansible_os_family == 'Debian'
- name: upgrade kernel
include_tasks: '{{ansible_distribution}}.yml'
when: (ansible_distribution == 'Debian' and not xanmod) or ansible_distribution == 'CentOS'
- name: Debian after tasks
include_tasks: 'Debian-after.yml'
when: ansible_distribution == 'Debian'
- name: Docker apt 源公钥
become: true
apt_key:
url: 'https://dl.xanmod.org/gpg.key'
- name: Docker apt 源
become: true
apt_repository:
repo: 'deb http://deb.xanmod.org releases main'
filename: xanmod-kernel
- name: install xanmod kernel
become: true
apt:
name: linux-xanmod
state: latest
update_cache: true
......@@ -12,6 +12,9 @@
- name: add swap
include_tasks: 'swapon.yml'
when: 'ansible_memtotal_mb < 1024 and not swap_result.stdout'
- name: railgun
include_tasks: 'railgun.yml'
when: railgun
- name: upgrade
include_tasks: 'upgrade.yml'
when: upgrade
......
- name: railgun
uri:
url: https://m.lv5.ac/api/select
method: 'POST'
body_format: json
body:
destination: 'chnroute'
remoteGatewayId: 31
return_content: true
status_code:
- 200
- 201
changed_when: false
ignore_errors: true
......@@ -30,8 +30,8 @@
install_recommends: false
when: nvidia_driver_version
- name: upgrade kernel
include_tasks: 'kernel/{{ansible_distribution}}.yml'
when: (ansible_distribution == 'Debian' or ansible_distribution == 'CentOS') and ansible_virtualization_type != "docker"
include_tasks: 'kernel/entry.yml'
when: ansible_virtualization_type != "docker"
- name: redhat configures before reboot
include_tasks: redhat_configures.yml
when: ansible_os_family == 'RedHat'
......
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