Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
P
playbooks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
playbooks
Commits
04183657
Commit
04183657
authored
Jan 02, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use include
parent
0412c3b5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
203 additions
and
196 deletions
+203
-196
includes/docker.yml
includes/docker.yml
+58
-0
includes/mono.yml
includes/mono.yml
+35
-0
includes/nodejs.yml
includes/nodejs.yml
+90
-0
install_docker.yml
install_docker.yml
+2
-57
install_srvpro.yml
install_srvpro.yml
+9
-78
pter.yml
pter.yml
+7
-61
utility.yml
utility.yml
+2
-0
No files found.
includes/docker.yml
0 → 100644
View file @
04183657
---
# Ubuntu and Debian only
-
name
:
basic packages for docker
become
:
true
apt
:
update_cache
:
true
state
:
latest
name
:
curl,wget,apt-transport-https,lsb-release,gnupg,tar,unzip,rsync
-
name
:
Docker key
become
:
true
apt_key
:
url
:
https://mirrors.aliyun.com/docker-ce/linux/debian/gpg
when
:
"
ansible_distribution
==
'Debian'"
-
name
:
Docker source clean
become
:
true
apt_repository
:
repo
:
deb [arch=amd64] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable
filename
:
docker
state
:
absent
when
:
"
ansible_distribution
==
'Debian'"
-
name
:
Docker source
become
:
true
apt_repository
:
repo
:
deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable
filename
:
docker
when
:
"
ansible_distribution
==
'Debian'"
-
name
:
Docker for Debian
become
:
true
apt
:
state
:
latest
update_cache
:
true
name
:
docker-ce,python-backports-shutil-get-terminal-size,python-backports.ssl-match-hostname,python-pip
when
:
"
ansible_distribution
==
'Debian'"
-
name
:
Docker for Ubuntu
become
:
true
apt
:
state
:
latest
update_cache
:
true
name
:
docker.io,python-backports-shutil-get-terminal-size,python-backports.ssl-match-hostname,python-pip
when
:
"
ansible_distribution
==
'Ubuntu'"
-
name
:
docker user group
become
:
true
user
:
name
:
'
{{ansible_user_id}}'
append
:
true
groups
:
docker
when
:
"
ansible_user_id
!=
'root'"
-
name
:
docker-compose pip
become
:
true
pip
:
name
:
pip
state
:
latest
extra_args
:
-i https://mirrors.aliyun.com/pypi/simple/
-
name
:
docker-compose
become
:
true
pip
:
name
:
docker-compose
state
:
latest
extra_args
:
-i https://mirrors.aliyun.com/pypi/simple/
includes/mono.yml
0 → 100644
View file @
04183657
---
-
name
:
mono from apt
become
:
true
apt
:
update_cache
:
true
state
:
latest
name
:
mono-complete
when
:
"
ansible_distribution
!=
'CentOS'"
-
name
:
mono yum key
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
:
true
yum_repository
:
name
:
mono
description
:
mono
baseurl
:
'
https://download.mono-project.com/repo/centos{{ansible_distribution_major_version}}-stable/'
ip_resolve
:
4
gpgkey
:
"
https://download.mono-project.com/repo/xamarin.gpg"
when
:
"
ansible_distribution
==
'CentOS'"
-
name
:
mono from yum
become
:
true
yum
:
state
:
latest
update_cache
:
true
name
:
mono-complete
when
:
"
ansible_distribution
==
'CentOS'
and
ansible_distribution_major_version|int
<=
7"
-
name
:
mono from dnf
become
:
true
dnf
:
state
:
latest
name
:
mono-complete
when
:
"
ansible_distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
includes/nodejs.yml
0 → 100644
View file @
04183657
---
-
name
:
basic packages for node
become
:
true
apt
:
update_cache
:
true
state
:
latest
name
:
curl,apt-transport-https,lsb-release,gnupg
when
:
"
ansible_distribution
!=
'CentOS'"
-
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
with_items
:
-
deb
-
deb-src
apt_repository
:
filename
:
nodesource
repo
:
'
{{item}}
https://deb.nodesource.com/node_{{nodejs_version}}.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
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
:
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
:
epel
7
become
:
true
yum
:
state
:
latest
update_cache
:
true
name
:
epel-release
when
:
"
ansible_distribution
==
'CentOS'
and
ansible_distribution_major_version|int
<=
7"
-
name
:
nodejs from yum
become
:
true
yum
:
state
:
latest
update_cache
:
true
name
:
npm
when
:
"
ansible_distribution
==
'CentOS'
and
ansible_distribution_major_version|int
<=
7"
-
name
:
epel
8
become
:
true
dnf
:
state
:
latest
name
:
epel-release
when
:
"
ansible_distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
-
name
:
nodejs from dnf
become
:
true
dnf
:
state
:
latest
name
:
nodejs,npm
when
:
"
ansible_distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
-
name
:
npm
become
:
true
npm
:
name
:
'
n'
state
:
latest
global
:
true
-
name
:
nodejs version
become
:
true
shell
:
'
n
{{nodejs_version}}'
-
name
:
node setcap
become
:
true
with_items
:
[
'
/usr/bin/node'
,
'
/usr/local/bin/node'
]
shell
:
'
setcap
cap_net_bind_service=+eip
{{item}}'
when
:
"
ansible_user_id
!=
'root'"
-
name
:
npm
become
:
true
with_items
:
-
npm
-
pm2
npm
:
name
:
'
{{item}}'
state
:
latest
global
:
true
-
name
:
fixup npm directory
become
:
true
file
:
path
:
~/.npm
owner
:
'
{{ansible_user_id}}'
group
:
'
{{ansible_user_id}}'
recurse
:
true
install_docker.yml
View file @
04183657
...
...
@@ -2,60 +2,5 @@
-
hosts
:
docker
remote_user
:
root
tasks
:
-
name
:
apt
become
:
true
apt
:
update_cache
:
true
state
:
latest
name
:
curl,wget,apt-transport-https,lsb-release,gnupg,tar,unzip,rsync
-
name
:
Docker key
become
:
true
apt_key
:
url
:
https://mirrors.aliyun.com/docker-ce/linux/debian/gpg
when
:
"
ansible_distribution
==
'Debian'"
-
name
:
Docker source clean
become
:
true
apt_repository
:
repo
:
deb [arch=amd64] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable
filename
:
docker
state
:
absent
when
:
"
ansible_distribution
==
'Debian'"
-
name
:
Docker source
become
:
true
apt_repository
:
repo
:
deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable
filename
:
docker
when
:
"
ansible_distribution
==
'Debian'"
-
name
:
Docker for Debian
become
:
true
apt
:
state
:
latest
update_cache
:
true
name
:
docker-ce,python-backports-shutil-get-terminal-size,python-backports.ssl-match-hostname,python-pip
when
:
"
ansible_distribution
==
'Debian'"
-
name
:
Docker for Ubuntu
become
:
true
apt
:
state
:
latest
update_cache
:
true
name
:
docker.io,python-backports-shutil-get-terminal-size,python-backports.ssl-match-hostname,python-pip
when
:
"
ansible_distribution
==
'Ubuntu'"
-
name
:
docker user group
become
:
true
user
:
name
:
'
{{ansible_user_id}}'
append
:
true
groups
:
docker
when
:
"
ansible_user_id
!=
'root'"
-
name
:
docker-compose pip
become
:
true
pip
:
name
:
pip
state
:
latest
extra_args
:
-i https://mirrors.aliyun.com/pypi/simple/
-
name
:
docker-compose
become
:
true
pip
:
name
:
docker-compose
state
:
latest
extra_args
:
-i https://mirrors.aliyun.com/pypi/simple/
-
name
:
docker
include
:
includes/docker.yml
install_srvpro.yml
View file @
04183657
---
-
hosts
:
srvpro
remote_user
:
root
#vars:
vars
:
nodejs_version
:
12
# home_path: ~
# fork: mycard
tasks
:
-
name
:
curl
become
:
true
apt
:
update_cache
:
true
state
:
latest
name
:
curl,apt-transport-https,lsb-release,gnupg
when
:
"
ansible_distribution
!=
'CentOS'"
-
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
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
include
:
includes/nodejs.yml
-
name
:
mono
include
:
includes/mono.yml
-
name
:
apt
become
:
true
apt
:
update_cache
:
true
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,redis-server,p7zip-full
when
:
"
ansible_distribution
!=
'CentOS'"
-
name
:
nodejs from nodesource
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
:
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
:
true
rpm_key
:
key
:
'
http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x3fa7e0328081bff6a14da29aa6a19b38d3d831ef'
when
:
"
ansible_distribution
==
'CentOS'"
-
name
:
mono yum source
become
:
true
yum_repository
:
name
:
mono
description
:
mono
baseurl
:
'
https://download.mono-project.com/repo/centos{{ansible_distribution_major_version}}-stable/'
ip_resolve
:
4
gpgkey
:
"
https://download.mono-project.com/repo/xamarin.gpg"
when
:
"
ansible_distribution
==
'CentOS'"
-
name
:
epel
7
become
:
true
yum
:
...
...
@@ -66,16 +24,12 @@
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
:
yum
become
:
true
yum
:
state
:
latest
update_cache
:
true
name
:
wget,git,
npm,gcc,gcc-c++,make,sqlite-devel,readline-devel,openssl-devel,libevent-devel,mono-complete
,redis,p7zip,p7zip-plugins,tar,unzip
name
:
wget,git,
gcc,gcc-c++,make,sqlite-devel,readline-devel,openssl-devel,libevent-devel
,redis,p7zip,p7zip-plugins,tar,unzip
when
:
"
ansible_distribution
==
'CentOS'
and
ansible_distribution_major_version|int
<=
7"
-
name
:
epel
8
become
:
true
...
...
@@ -87,31 +41,8 @@
become
:
true
dnf
:
state
:
latest
name
:
curl,wget,g
it,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,g
cc,gcc-c++,make,sqlite-devel,readline-devel,openssl-devel,libevent-devel
,redis,p7zip,p7zip-plugins,tar,unzip
when
:
"
ansible_distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
-
name
:
npm
become
:
true
npm
:
name
:
'
n'
state
:
latest
global
:
true
-
name
:
nodejs version
become
:
true
shell
:
n
12
-
name
:
node setcap
become
:
true
with_items
:
[
'
/usr/bin/node'
,
'
/usr/local/bin/node'
]
shell
:
'
setcap
cap_net_bind_service=+eip
{{item}}'
when
:
"
ansible_user_id
!=
'root'"
-
name
:
npm
become
:
true
with_items
:
-
npm
-
pm2
npm
:
name
:
'
{{item}}'
state
:
latest
global
:
true
-
name
:
ygopro
git
:
repo
:
'
https://github.com/{{fork}}/ygopro'
...
...
pter.yml
View file @
04183657
---
-
hosts
:
pter
remote_user
:
root
vars
:
nodejs_version
:
10
tasks
:
-
name
:
nodejs
include
:
includes/nodejs.yml
-
name
:
docker
include
:
includes/docker.yml
-
name
:
apt
apt
:
update_cache
:
true
state
:
latest
name
:
curl,wget,apt-transport-https,lsb-release,gnupg,build-essential,tar,unzip,python,rsync
-
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
:
update_cache
:
true
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
:
update_cache
:
true
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://mirrors.aliyun.com/docker-ce/linux/debian/gpg
when
:
"
ansible_distribution
==
'Debian'"
-
name
:
Docker source
apt_repository
:
repo
:
deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/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
:
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
:
curl,wget,build-essential,tar,unzip,python,rsync
-
name
:
directories
file
:
path
:
'
/srv/{{item}}'
...
...
utility.yml
View file @
04183657
...
...
@@ -2,6 +2,8 @@
-
hosts
:
utility
remote_user
:
root
tasks
:
-
name
:
docker
include
:
includes/docker.yml
-
name
:
utility directory
file
:
path
:
/root/utility
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment