Commit 7f9d30b1 authored by nanahira's avatar nanahira

update

parent 115c2d67
#!/bin/bash
sudo iptables "$@"
echo "# use iptables-restore --noflush" > ~/iptables-gateways
echo "*nat" >> ~/iptables-gateways
echo ":PREROUTING -" >> ~/iptables-gateways
sudo iptables -t nat -S PREROUTING | grep -- "-j DNAT" >> ~/iptables-gateways
echo "COMMIT" >> ~/iptables-gateways
sudo iptables-save > ~/ipt
......@@ -6,6 +6,19 @@
authorized_key:
user: "{{ ansible_user_id }}"
key: "{{ webvirt_ssh_key }}"
- name: get cpufreq policy path
find:
paths:
- /sys/devices/system/cpu/cpufreq/
file_type: directory
register: freq_list
- name: cpufreq performance
become: true
copy:
content: performance
dest: '{{item.path}}/scaling_governor'
unsafe_writes: true
with_items: '{{freq_list.files}}'
- name: apt
become: true
when: "ansible_distribution != 'CentOS'"
......@@ -56,6 +69,7 @@
systemd:
name: firewalld
state: stopped
enabled: false
when: "ansible_distribution == 'CentOS'"
- name: flush forward table
become: true
......
......@@ -126,7 +126,7 @@
apt:
update_cache: true
state: latest
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,build-essential,p7zip-full,xclip,astyle,python-setuptools,python-dev,tcpdump,rsync,htop,locales,mtr,dnsutils,net-tools,traceroute,tar,unzip,iperf,nmap,dnsutils
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,build-essential,p7zip-full,xclip,astyle,python-setuptools,python-dev,tcpdump,rsync,htop,locales,mtr,dnsutils,net-tools,traceroute,tar,unzip,iperf,nmap,mosh
when: "ansible_distribution != 'CentOS'"
- name: Ubuntu packages
become: true
......@@ -157,7 +157,7 @@
become: true
yum:
state: latest
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,tcpdump,rsync,htop,mtr,net-tools,ctags,xclip,traceroute,tar,unzip,iperf,nmap,libselinux-python # astyle
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,tcpdump,rsync,htop,mtr,net-tools,ctags,xclip,traceroute,tar,unzip,iperf,nmap,libselinux-python,mosh # astyle
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int == 7"
- name: epel 8
become: true
......@@ -169,7 +169,7 @@
become: true
dnf:
state: latest
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,tcpdump,rsync,htop,mtr,net-tools,ctags,astyle,traceroute,tar,unzip,nmap,python3-libselinux # xclip
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,tcpdump,rsync,htop,mtr,net-tools,ctags,astyle,traceroute,tar,unzip,nmap,python3-libselinux,mosh # xclip
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int == 8"
- name: dnf autoremove
become: true
......
......@@ -74,7 +74,7 @@
- name: build
make:
chdir: '{{home_path}}/ygopro/build'
target: "config=release -j{{ lookup('pipe', 'nproc') }}"
target: "config=release -j{{ ansible_processor_vcpus }}"
- name: strip ygopro
shell: strip bin/release/ygopro
ignore_errors: true
......@@ -182,6 +182,7 @@
systemd:
name: firewalld
state: stopped
enabled: false
when: "ansible_distribution == 'CentOS'"
- name: redis
become: true
......
......@@ -68,7 +68,7 @@
- name: build
make:
chdir: '{{home_path}}/ygopro-new/build'
target: 'config=release -j{{ lookup("pipe", "nproc") }}'
target: 'config=release -j{{ ansible_processor_vcpus }}'
- name: strip ygopro
shell: strip bin/release/ygopro
args:
......
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