Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
I
init
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
MyCard
init
Commits
a76d3700
Commit
a76d3700
authored
Jun 04, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pip
parent
6ec2a84f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
76 additions
and
48 deletions
+76
-48
defaults/main.yml
defaults/main.yml
+2
-1
tasks/apt.yml
tasks/apt.yml
+7
-2
tasks/dnf.yml
tasks/dnf.yml
+1
-1
tasks/docker.yml
tasks/docker.yml
+7
-43
tasks/main.yml
tasks/main.yml
+2
-0
tasks/pip.yml
tasks/pip.yml
+56
-0
tasks/yum.yml
tasks/yum.yml
+1
-1
No files found.
defaults/main.yml
View file @
a76d3700
...
...
@@ -12,6 +12,7 @@ china_mirror: false
install_docker
:
false
upgrade
:
false
reboot
:
false
pip_executable
:
pip
pip_executable
_install
:
pip
china_mirror_docker
:
false
china_mirror_pip
:
false
cpufreq
:
none
tasks/apt.yml
View file @
a76d3700
...
...
@@ -2,7 +2,7 @@
become
:
true
apt
:
update_cache
:
true
name
:
curl,wget,git,vim,sudo,byobu,iftop,iotop,build-essential,p7zip-full,p7zip-rar,xclip,astyle,
python3-setuptools,python3-dev,python3-pip,
tcpdump,rsync,htop,locales,mtr,dnsutils,net-tools,traceroute,tar,unzip,iperf,iperf3,nmap,mosh,subversion,nfs-common,fish,haveged,ipset
name
:
curl,wget,git,vim,sudo,byobu,iftop,iotop,build-essential,p7zip-full,p7zip-rar,xclip,astyle,tcpdump,rsync,htop,locales,mtr,dnsutils,net-tools,traceroute,tar,unzip,iperf,iperf3,nmap,mosh,subversion,nfs-common,fish,haveged,ipset
-
name
:
ctags in old Ubuntu
become
:
true
apt
:
...
...
@@ -21,10 +21,15 @@
apt
:
name
:
universal-ctags
when
:
ansible_distribution == 'Debian' or ansible_distribution_release == 'focal'
-
name
:
non-focal packages
become
:
true
apt
:
name
:
python-setuptools,python-dev,python-pip
when
:
ansible_distribution_release != 'focal'
-
name
:
focal packages
become
:
true
apt
:
name
:
python
-is-python3,wireguard
name
:
python
3-setuptools,python3-dev,python-is-python3,wireguard,python3-pip
when
:
ansible_distribution_release == 'focal'
-
name
:
open vm tools
become
:
true
...
...
tasks/dnf.yml
View file @
a76d3700
...
...
@@ -6,7 +6,7 @@
-
name
:
dnf
become
:
true
dnf
:
name
:
curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,python3-pip,tcpdump,rsync,htop,mtr,net-tools,ctags,astyle,xclip,traceroute,tar,unzip,nmap,python3-libselinux,mosh,subversion,haveged,nfs-utils,ipset
# nfs-common,fish
name
:
curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,python3-pip,
python3-devel,
tcpdump,rsync,htop,mtr,net-tools,ctags,astyle,xclip,traceroute,tar,unzip,nmap,python3-libselinux,mosh,subversion,haveged,nfs-utils,ipset
# nfs-common,fish
update_cache
:
yes
-
name
:
Fedora packages
become
:
true
...
...
tasks/docker.yml
View file @
a76d3700
...
...
@@ -43,14 +43,14 @@
-
name
:
安装 Docker (apt)
become
:
true
apt
:
name
:
docker-ce,python-backports-shutil-get-terminal-size,python-backports.ssl-match-hostname
,python-pip
name
:
docker-ce,python-backports-shutil-get-terminal-size,python-backports.ssl-match-hostname
update_cache
:
yes
when
:
ansible_os_family == 'Debian' and ansible_distribution_release != 'focal'
notify
:
restart_docker
-
name
:
安装 Docker (focal)
become
:
true
apt
:
name
:
docker.io
,python3-pip
name
:
docker.io
update_cache
:
yes
when
:
ansible_os_family == 'Debian' and ansible_distribution_release == 'focal'
notify
:
restart_docker
...
...
@@ -87,21 +87,21 @@
-
name
:
安装 Docker (yum)
become
:
true
yum
:
name
:
python3-pip,
docker-ce,docker-ce-cli,containerd.io
name
:
docker-ce,docker-ce-cli,containerd.io
update_cache
:
yes
when
:
ansible_os_family == 'RedHat' and ansible_distribution_major_version|int <
8
notify
:
restart_docker
-
name
:
安装 Docker (CentOS 8)
become
:
true
dnf
:
name
:
python3-pip,
docker-ce,docker-ce-cli,containerd.io
name
:
docker-ce,docker-ce-cli,containerd.io
update_cache
:
yes
when
:
ansible_os_family == 'RedHat' and ansible_distribution_major_version|int ==
8
notify
:
restart_docker
-
name
:
安装 Docker (Fedora)
become
:
true
dnf
:
name
:
python3-pip,
moby-engine
name
:
moby-engine
update_cache
:
yes
when
:
ansible_distribution == 'Fedora'
notify
:
restart_docker
...
...
@@ -112,55 +112,19 @@
append
:
true
groups
:
docker
when
:
ansible_user_id != 'root'
-
name
:
docker-compose 清理 pip
file
:
path
:
~/.pip
state
:
absent
-
name
:
docker-compose 清理 easy install
become
:
true
file
:
path
:
'
/usr/local/lib/python{{item}}/dist-packages/easy-install.pth'
state
:
absent
with_items
:
-
2.7
-
3.5
-
3.6
-
3.7
-
3.8
-
name
:
'
use
pip3'
set_fact
:
pip_executable
:
pip3
when
:
ansible_os_family == 'RedHat' or ansible_distribution_release == 'focal'
-
name
:
docker-compose pip
become
:
true
pip
:
name
:
pip
executable
:
'
{{pip_executable}}'
state
:
latest
when
:
not china_mirror_docker
-
name
:
docker-compose
become
:
true
pip
:
name
:
docker-compose
executable
:
'
{{pip_executable}}'
state
:
latest
when
:
not china_mirror_docker
-
name
:
docker-compose 国内
become
:
true
pip
:
name
:
pip
executable
:
'
{{pip_executable}}'
state
:
latest
extra_args
:
-i https://mirrors.aliyun.com/pypi/simple/
when
:
china_mirror_docker
when
:
not china_mirror_pip
-
name
:
docker-compose 国内
become
:
true
pip
:
name
:
docker-compose
executable
:
'
{{pip_executable}}'
state
:
latest
extra_args
:
-i https://mirrors.aliyun.com/pypi/simple/
when
:
china_mirror_
docker
when
:
china_mirror_
pip
-
name
:
docker 配置 创建目录
become
:
true
file
:
...
...
tasks/main.yml
View file @
a76d3700
...
...
@@ -33,6 +33,8 @@
-
name
:
redhat configures
include_tasks
:
redhat_configures.yml
when
:
ansible_os_family == 'RedHat'
-
name
:
pip
include_tasks
:
pip.yml
-
name
:
docker
include_tasks
:
docker.yml
when
:
install_docker
...
...
tasks/pip.yml
0 → 100644
View file @
a76d3700
-
name
:
'
use
pip3'
set_fact
:
pip_executable_install
:
pip3
when
:
ansible_python.version.major ==
3
-
name
:
'
use
pip'
set_fact
:
pip_executable_install
:
pip
when
:
ansible_python.version.major ==
2
-
name
:
china mirror pip
set_fact
:
china_mirror_pip
:
true
when
:
china_mirror
-
name
:
clean pip dir
file
:
path
:
~/.pip
state
:
absent
-
name
:
clean easy install
become
:
true
file
:
path
:
'
/usr/local/lib/python{{item}}/dist-packages/easy-install.pth'
state
:
absent
with_items
:
-
2.7
-
3.5
-
3.6
-
3.7
-
3.8
-
name
:
upgrade pip
become
:
true
pip
:
name
:
pip
executable
:
'
{{pip_executable_install}}'
state
:
latest
when
:
not china_mirror_pip
-
name
:
upgrade pip China
become
:
true
pip
:
name
:
pip
executable
:
'
{{pip_executable_install}}'
state
:
latest
extra_args
:
-i https://mirrors.aliyun.com/pypi/simple/
when
:
china_mirror_pip
-
name
:
pip package list
set_fact
:
pip_package_list
:
'
autopep8'
-
name
:
pip packages
become
:
true
pip
:
name
:
'
{{pip_package_list}}'
when
:
not china_mirror_pip
-
name
:
pip packages China
become
:
true
pip
:
name
:
'
{{pip_package_list}}'
extra_args
:
-i https://mirrors.aliyun.com/pypi/simple/
when
:
china_mirror_pip
tasks/yum.yml
View file @
a76d3700
...
...
@@ -5,7 +5,7 @@
-
name
:
yum
become
:
true
yum
:
name
:
curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,python-pip,tcpdump,rsync,htop,mtr,net-tools,ctags,xclip,traceroute,tar,unzip,iperf,iperf3,nmap,libselinux-python,mosh,subversion,fish,haveged,mtr,rsync,nfs-utils,ipset
# astyle
name
:
curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,python-pip,
python-devel,
tcpdump,rsync,htop,mtr,net-tools,ctags,xclip,traceroute,tar,unzip,iperf,iperf3,nmap,libselinux-python,mosh,subversion,fish,haveged,mtr,rsync,nfs-utils,ipset
# astyle
update_cache
:
yes
-
name
:
open vm tools
become
:
true
...
...
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