Commit b930b8f0 authored by nanahira's avatar nanahira

update

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