Commit b930b8f0 authored by nanahira's avatar nanahira

update

parent b7ef9800
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
become: true become: true
lineinfile: lineinfile:
path: /etc/ssh/sshd_config path: /etc/ssh/sshd_config
regexp: '^#?PasswordAuthentication yes.*$' regexp: '^#?PasswordAuthentication true.*$'
line: 'PasswordAuthentication no' line: 'PasswordAuthentication no'
backrefs: true backrefs: true
when: "ansible_user_id == 'root' or ansible_user_id == 'nanahira' or ansible_user_id == 'mycard' or ansible_user_id == 'zh99998'" # Only self-managed servers when: "ansible_user_id == 'root' or ansible_user_id == 'nanahira' or ansible_user_id == 'mycard' or ansible_user_id == 'zh99998'" # Only self-managed servers
...@@ -33,20 +33,20 @@ ...@@ -33,20 +33,20 @@
sysctl: sysctl:
name: vm.swappiness name: vm.swappiness
value: 1 value: 1
sysctl_set: yes sysctl_set: true
- name: TCP BBR - name: TCP BBR
become: true become: true
sysctl: sysctl:
name: net.core.default_qdisc name: net.core.default_qdisc
value: fq value: fq
sysctl_set: yes sysctl_set: true
when: "ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 7" when: "ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 7"
- name: TCP BBR - name: TCP BBR
become: true become: true
sysctl: sysctl:
name: net.ipv4.tcp_congestion_control name: net.ipv4.tcp_congestion_control
value: bbr value: bbr
sysctl_set: yes sysctl_set: true
when: "ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 7" when: "ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 7"
- name: limit - name: limit
become: true become: true
......
--- ---
- hosts: srvpro_install - hosts: srvpro
remote_user: root remote_user: root
#vars: #vars:
# home_path: ~ # home_path: ~
# fork: mycard # fork: mycard
tasks: tasks:
- name: curl - name: curl
become: yes become: true
apt: apt:
update_cache: true update_cache: true
state: latest state: latest
name: curl,apt-transport-https name: curl,apt-transport-https,lsb-release,gnupg
when: "ansible_distribution != 'CentOS'" when: "ansible_distribution != 'CentOS'"
- name: node source - name: node apt key
become: yes become: true
shell: 'curl -sL https://deb.nodesource.com/setup_12.x | bash -' apt_key:
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
when: "(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int < 18) or (ansible_distribution == 'Debian' and ansible_distribution_major_version|int < 9)"
- name: nodesource
become: true
apt_repository:
filename: nodesource
repo: 'deb https://deb.nodesource.com/node_12.x {{ansible_distribution_release}} main'
when: "(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int < 18) or (ansible_distribution == 'Debian' and ansible_distribution_major_version|int < 9)"
- name: nodesource
become: true
apt_repository:
filename: nodesource
repo: 'deb-src https://deb.nodesource.com/node_12.x {{ansible_distribution_release}} main'
when: "(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int < 18) or (ansible_distribution == 'Debian' and ansible_distribution_major_version|int < 9)" when: "(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int < 18) or (ansible_distribution == 'Debian' and ansible_distribution_major_version|int < 9)"
- name: apt - name: apt
become: yes become: true
apt: apt:
#update_cache: true update_cache: true
state: latest state: latest
name: wget,git,build-essential,libreadline-dev,libsqlite3-dev,libevent-dev,mono-complete,redis-server,p7zip-full name: wget,git,build-essential,libreadline-dev,libsqlite3-dev,libevent-dev,mono-complete,redis-server,p7zip-full
when: "ansible_distribution != 'CentOS'" when: "ansible_distribution != 'CentOS'"
- name: nodejs from nodesource - name: nodejs from nodesource
become: yes become: true
apt: apt:
state: latest state: latest
name: nodejs name: nodejs
when: "(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int < 18) or (ansible_distribution == 'Debian' and ansible_distribution_major_version|int < 9)" when: "(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int < 18) or (ansible_distribution == 'Debian' and ansible_distribution_major_version|int < 9)"
- name: nodejs from apt - name: nodejs from apt
become: yes become: true
apt: apt:
state: latest state: latest
name: npm name: npm
when: "(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int >= 18) or (ansible_distribution == 'Debian' and ansible_distribution_major_version|int >= 9)" when: "(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int >= 18) or (ansible_distribution == 'Debian' and ansible_distribution_major_version|int >= 9)"
- name: mono yum key - name: mono yum key
become: yes become: true
rpm_key: rpm_key:
key: 'http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x3fa7e0328081bff6a14da29aa6a19b38d3d831ef' key: 'http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x3fa7e0328081bff6a14da29aa6a19b38d3d831ef'
when: "ansible_distribution == 'CentOS'" when: "ansible_distribution == 'CentOS'"
- name: mono yum source - name: mono yum source
become: yes become: true
yum_repository: yum_repository:
name: mono name: mono
description: mono description: mono
...@@ -56,16 +69,16 @@ ...@@ -56,16 +69,16 @@
update_cache: true update_cache: true
name: epel-release,curl name: epel-release,curl
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int <= 7" when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int <= 7"
- name: node source #- name: node source
become: true # become: true
shell: 'curl -sL https://rpm.nodesource.com/setup_12.x | bash -' # shell: 'curl -sL https://rpm.nodesource.com/setup_12.x | bash -'
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int <= 7" # when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int <= 7"
- name: yum - name: yum
become: yes become: true
yum: yum:
state: latest state: latest
update_cache: true update_cache: true
name: wget,git,nodejs,gcc,gcc-c++,make,sqlite-devel,readline-devel,openssl-devel,libevent-devel,mono-complete,redis,p7zip,p7zip-plugins,tar,unzip name: wget,git,npm,gcc,gcc-c++,make,sqlite-devel,readline-devel,openssl-devel,libevent-devel,mono-complete,redis,p7zip,p7zip-plugins,tar,unzip
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int <= 7" when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int <= 7"
- name: epel 8 - name: epel 8
become: true become: true
...@@ -80,22 +93,22 @@ ...@@ -80,22 +93,22 @@
name: curl,wget,git,nodejs,npm,gcc,gcc-c++,make,sqlite-devel,readline-devel,openssl-devel,libevent-devel,mono-complete,redis,p7zip,p7zip-plugins,tar,unzip name: curl,wget,git,nodejs,npm,gcc,gcc-c++,make,sqlite-devel,readline-devel,openssl-devel,libevent-devel,mono-complete,redis,p7zip,p7zip-plugins,tar,unzip
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int == 8" when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int == 8"
- name: npm - name: npm
become: yes become: true
npm: npm:
name: 'n' name: 'n'
state: latest state: latest
global: true global: true
- name: nodejs version - name: nodejs version
become: yes become: true
shell: n 12 shell: n 12
- name: npm - name: npm
become: yes become: true
npm: npm:
name: npm name: npm
state: latest state: latest
global: true global: true
- name: pm2 - name: pm2
become: yes become: true
npm: npm:
name: pm2 name: pm2
state: latest state: latest
...@@ -112,7 +125,7 @@ ...@@ -112,7 +125,7 @@
unarchive: unarchive:
src: https://minio.mycard.moe:9000/nanahira/premake-5.0.0-alpha13-linux.tar.gz src: https://minio.mycard.moe:9000/nanahira/premake-5.0.0-alpha13-linux.tar.gz
dest: '{{home_path}}/ygopro/' dest: '{{home_path}}/ygopro/'
remote_src: yes remote_src: true
- name: premake5 gmake - name: premake5 gmake
shell: ./premake5 gmake shell: ./premake5 gmake
args: args:
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
src: /home/nanahira/ygo/koishipro2/koishipro2ios/ src: /home/nanahira/ygo/koishipro2/koishipro2ios/
dest: '{{ deploy_path }}' dest: '{{ deploy_path }}'
delete: no delete: no
recursive: yes recursive: true
verify_host: no verify_host: no
checksum: yes checksum: true
archive: no archive: no
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
unarchive: unarchive:
src: https://minio.mycard.moe:9000/nanahira/premake-5.0.0-alpha13-linux.tar.gz src: https://minio.mycard.moe:9000/nanahira/premake-5.0.0-alpha13-linux.tar.gz
dest: '{{home_path}}/ygopro/' dest: '{{home_path}}/ygopro/'
remote_src: yes remote_src: true
- name: ygopro new - name: ygopro new
shell: 'cp -rf {{home_path}}/ygopro {{home_path}}/ygopro-new' shell: 'cp -rf {{home_path}}/ygopro {{home_path}}/ygopro-new'
- name: ygopro - name: ygopro
......
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