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
7674b99a
Commit
7674b99a
authored
Jan 02, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docker is not supported by centos yet
parent
89ecfe64
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
55 deletions
+72
-55
install_docker.yml
install_docker.yml
+69
-0
pter.yml
pter.yml
+3
-24
utility.yml
utility.yml
+0
-31
No files found.
install_docker.yml
0 → 100644
View file @
7674b99a
---
-
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
:
fake pip
become
:
true
file
:
src
:
/usr/bin/pip3
dest
:
/usr/bin/pip
state
:
link
when
:
"
ansible_distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
-
name
:
docker-compose pip
become
:
true
pip
:
name
:
pip
state
:
latest
extra_args
:
-i https://mirrors.aliyun.com/pypi/simple/
when
:
"
ansible_distribution
!=
'CentOS'
or
ansible_distribution_major_version|int
!=
8"
-
name
:
docker-compose
become
:
true
pip
:
name
:
docker-compose
state
:
latest
extra_args
:
-i https://mirrors.aliyun.com/pypi/simple/
pter.yml
View file @
7674b99a
...
...
@@ -7,7 +7,6 @@
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
...
...
@@ -18,11 +17,13 @@
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)"
...
...
@@ -32,7 +33,7 @@
when
:
"
ansible_distribution
==
'Debian'"
-
name
:
Docker source
apt_repository
:
repo
:
deb [arch=amd64] https://mirrors.aliyun.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable
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
...
...
@@ -47,28 +48,6 @@
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'
...
...
utility.yml
View file @
7674b99a
...
...
@@ -2,37 +2,6 @@
-
hosts
:
utility
remote_user
:
root
tasks
:
-
name
:
pre packages
apt
:
update_cache
:
true
name
:
curl,wget,apt-transport-https,lsb-release,gnupg
state
:
latest
-
name
:
Docker key
apt_key
:
url
:
https://mirrors.aliyun.com/docker-ce/linux/debian/gpg
-
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
-
name
:
apt
apt
:
update_cache
:
true
name
:
docker-ce,python-backports-shutil-get-terminal-size,python-backports.ssl-match-hostname,python-pip,rsync
state
:
latest
-
name
:
docker service
systemd
:
name
:
docker
state
:
started
-
name
:
docker-compose pip
pip
:
name
:
pip
state
:
latest
extra_args
:
-i https://mirrors.aliyun.com/pypi/simple/
-
name
:
docker-compose
pip
:
name
:
docker-compose
state
:
latest
extra_args
:
-i https://mirrors.aliyun.com/pypi/simple/
-
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