Commit cc348d9f authored by nanahira's avatar nanahira

new

parent 5b1bd214
......@@ -165,15 +165,12 @@
dnf:
autoremove: true
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int == 8"
- name: vimrc
copy:
src: ~/.vimrc
dest: ~/.vimrc
- name: vim
synchronize:
src: ~/.vim/
dest: ~/.vim
delete: true
unarchive:
src: https://minio.mycard.moe:9000/nanahira/nanahira-vim.tar.gz
dest: '~'
creates: '~/.vim'
remote_src: true
- name: git user.email
git_config:
name: user.email
......
......@@ -124,6 +124,7 @@
unarchive:
src: https://minio.mycard.moe:9000/nanahira/premake-5.0.0-alpha13-linux.tar.gz
dest: '{{home_path}}/ygopro/'
creates: '{{home_path}}/ygopro/premake5'
remote_src: true
- name: premake5 gmake
shell: ./premake5 gmake
......
{
"web": {
"host": "0.0.0.0",
"listen": 8443,
"ssl": {
"enabled": true,
"certificate": "/srv/certs/fullchain.pem",
"key": "/srv/certs/privkey.pem"
}
},
"docker": {
"container": {
"user": null
},
"network": {
"name": "pterodactyl_nw"
},
"socket": "/var/run/docker.sock",
"autoupdate_images": true
},
"filesystem": {
"server_logs": "/tmp/pterodactyl"
},
"internals": {
"disk_use_seconds": 30,
"set_permissions_on_boot": true,
"throttle": {
"enabled": true,
"kill_at_count": 5,
"decay": 10,
"lines": 1000,
"check_interval_ms": 100
}
},
"sftp": {
"path": "/srv/daemon-data",
"ip": "0.0.0.0",
"port": 2022,
"keypair": {
"bits": 2048,
"e": 65537
}
},
"logger": {
"path": "logs/",
"src": false,
"level": "info",
"period": "1d",
"count": 3
},
"remote": {
"base": "{{ remote }}"
},
"uploads": {
"size_limit": 100
},
"keys": [
"{{ key }}"
]
}
---
- hosts: pter
remote_user: root
tasks:
- name: apt
apt:
update_cache: true
state: latest
name: curl,wget,apt-transport-https,lsb-release,gnupg,build-essential,tar,unzip,python,rsync
when: "ansible_distribution != 'CentOS'"
- name: nodesource
with_items:
- deb
- deb-src
apt_repository:
filename: nodesource
repo: '{{item}} 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: nodejs from nodesource
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
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: Docker key
apt_key:
url: https://download.docker.com/linux/debian/gpg
when: "ansible_distribution == 'Debian'"
- name: Docker source
apt_repository:
repo: deb [arch=amd64] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable
filename: docker
when: "ansible_distribution == 'Debian'"
- name: Docker for Debian
apt:
state: latest
update_cache: true
name: docker-ce
when: "ansible_distribution == 'Debian'"
- name: Docker for Ubuntu
apt:
state: latest
update_cache: true
name: docker.io
when: "ansible_distribution == 'Ubuntu'"
- name: epel 7
yum:
state: latest
update_cache: true
name: epel-release,curl
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int <= 7"
- name: yum
yum:
state: latest
update_cache: true
name: wget,npm,gcc,gcc-c++,make,tar,unzip,docker,python,rsync
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int <= 7"
- name: epel 8
dnf:
state: latest
name: epel-release
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int == 8"
- name: dnf
dnf:
state: latest
name: curl,wget,npm,gcc,gcc-c++,make,tar,unzip,docker,python,rsync
when: "ansible_distribution == 'CentOS' and ansible_distribution_major_version|int == 8"
- name: npm
npm:
name: 'n'
state: latest
global: true
- name: nodejs version
shell: n 10
- name: npm
with_items:
- npm
- pm2
npm:
name: '{{item}}'
state: latest
global: true
- name: docker systemd
systemd:
state: started
name: docker
- name: directories
file:
path: '/srv/{{item}}'
state: directory
with_items:
- daemon
- daemon-data
- name: download daemon
unarchive:
src: https://github.com/pterodactyl/daemon/releases/download/v0.6.12/daemon.tar.gz
dest: /srv/daemon
creates: /srv/daemon/src
remote_src: true
extra_opts:
- --strip-components=1
- name: npm install
npm:
path: /srv/daemon
production: true
- name: core.json
template:
src: pter.json.j2
dest: /srv/daemon/config/core.json
notify: launch
- name: certs
synchronize:
src: '{{ cert_path }}/'
dest: /srv/certs
delete: true
notify: launch
handlers:
- name: launch
shell: 'pm2 start src/index.js --name daemon && pm2 save && pm2 startup'
args:
chdir: /srv/daemon
......@@ -49,6 +49,7 @@
unarchive:
src: https://minio.mycard.moe:9000/nanahira/premake-5.0.0-alpha13-linux.tar.gz
dest: '{{home_path}}/ygopro/'
creates: '{{home_path}}/ygopro/premake5'
remote_src: true
- name: ygopro new
shell: 'cp -rf {{home_path}}/ygopro {{home_path}}/ygopro-new'
......
......@@ -24,7 +24,7 @@
- name: aws
synchronize:
src: ~/.aws/
dest: ~/aws
dest: ~/.aws
delete: true
#- name: premake5 sync
# become: true
......
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