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
02fc4d2f
Commit
02fc4d2f
authored
Feb 13, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use red hat
parent
46e9e640
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
46 deletions
+46
-46
hypervisor.yml
hypervisor.yml
+5
-5
init.yml
init.yml
+9
-9
install_srvpro.yml
install_srvpro.yml
+5
-5
pter.yml
pter.yml
+1
-1
roles/docker/tasks/main.yml
roles/docker/tasks/main.yml
+2
-2
roles/mono/tasks/main.yml
roles/mono/tasks/main.yml
+4
-4
roles/nodejs/tasks/main.yml
roles/nodejs/tasks/main.yml
+4
-4
roles/wireguard/tasks/main.yml
roles/wireguard/tasks/main.yml
+5
-5
template.yml
template.yml
+11
-11
No files found.
hypervisor.yml
View file @
02fc4d2f
...
...
@@ -31,10 +31,10 @@
yum
:
state
:
latest
name
:
epel-release
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
<=
7"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int <= 7"
-
name
:
yum
become
:
true
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
<=
7"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int <= 7"
yum
:
state
:
latest
update_cache
:
true
...
...
@@ -44,10 +44,10 @@
dnf
:
state
:
latest
name
:
epel-release
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
-
name
:
dnf
become
:
true
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
dnf
:
state
:
latest
name
:
sudo,python3,qemu-kvm,qemu-img,libvirt,python3-libvirt,libguestfs-tools,virt-install,python3-lxml
...
...
@@ -70,7 +70,7 @@
name
:
firewalld
state
:
stopped
enabled
:
false
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
flush forward table
become
:
true
iptables
:
...
...
init.yml
View file @
02fc4d2f
...
...
@@ -107,14 +107,14 @@
name
:
'
*'
update_cache
:
true
state
:
latest
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
7"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 7"
-
name
:
dnf update
become
:
true
dnf
:
name
:
'
*'
#update_cache: true
state
:
latest
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
-
name
:
fixup iptables with qemu
become
:
true
iptables
:
...
...
@@ -152,42 +152,42 @@
yum
:
state
:
latest
name
:
epel-release
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
7"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 7"
-
name
:
yum
become
:
true
yum
:
state
:
latest
name
:
curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,tcpdump,rsync,htop,mtr,net-tools,ctags,xclip,traceroute,tar,unzip,iperf,nmap,libselinux-python,mosh
# astyle
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
7"
when
:
"
ansible_
os_family
==
"RedHat"
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"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
-
name
:
dnf
become
:
true
dnf
:
state
:
latest
name
:
curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,tcpdump,rsync,htop,mtr,net-tools,ctags,astyle,traceroute,tar,unzip,nmap,python3-libselinux,mosh
# xclip
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
-
name
:
dnf autoremove
become
:
true
dnf
:
autoremove
:
true
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
-
name
:
disable selinux
become
:
true
selinux
:
state
:
disabled
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
disable selinux
lineinfile
:
path
:
/etc/selinux/config
regexp
:
'
^SELINUX='
line
:
'
SELINUX=disabled'
backrefs
:
true
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
vim
unarchive
:
src
:
https://minio.mycard.moe:9000/nanahira/nanahira-vim.tar.gz
...
...
install_srvpro.yml
View file @
02fc4d2f
...
...
@@ -25,26 +25,26 @@
state
:
latest
update_cache
:
true
name
:
epel-release,curl
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
<=
7"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int <= 7"
-
name
:
yum
become
:
true
yum
:
state
:
latest
update_cache
:
true
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"
when
:
"
ansible_
os_family
==
"RedHat"
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"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
-
name
:
dnf
become
:
true
dnf
:
state
:
latest
name
:
curl,wget,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
==
8"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
-
name
:
pre data
git
:
repo
:
'
https://git.dev.tencent.com/mercury233/ygopro-pre-data.git'
...
...
@@ -191,7 +191,7 @@
name
:
firewalld
state
:
stopped
enabled
:
false
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
redis
become
:
true
systemd
:
...
...
pter.yml
View file @
02fc4d2f
...
...
@@ -20,7 +20,7 @@
state
:
latest
update_cache
:
true
name
:
curl,wget,gcc,gcc-c++,make,tar,unzip,python,rsync
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
directories
file
:
path
:
'
/srv/{{item}}'
...
...
roles/docker/tasks/main.yml
View file @
02fc4d2f
...
...
@@ -43,13 +43,13 @@
state
:
latest
update_cache
:
true
name
:
epel-release
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
<=
7"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int <= 7"
-
name
:
docker from yum
yum
:
state
:
latest
update_cache
:
true
name
:
rsync,tar,unzip,docker,python-pip
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
<=
7"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int <= 7"
-
name
:
systemd
become
:
true
systemd
:
...
...
roles/mono/tasks/main.yml
View file @
02fc4d2f
...
...
@@ -10,7 +10,7 @@
become
:
true
rpm_key
:
key
:
'
http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x3fa7e0328081bff6a14da29aa6a19b38d3d831ef'
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
mono yum source
become
:
true
yum_repository
:
...
...
@@ -19,17 +19,17 @@
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'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
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"
when
:
"
ansible_
os_family
==
"RedHat"
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"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
roles/nodejs/tasks/main.yml
View file @
02fc4d2f
...
...
@@ -38,26 +38,26 @@
state
:
latest
update_cache
:
true
name
:
epel-release
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
<=
7"
when
:
"
ansible_
os_family
==
"RedHat"
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"
when
:
"
ansible_
os_family
==
"RedHat"
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"
when
:
"
ansible_
os_family
==
"RedHat"
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"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
-
name
:
npm
become
:
true
npm
:
...
...
roles/wireguard/tasks/main.yml
View file @
02fc4d2f
...
...
@@ -41,29 +41,29 @@
baseurl
:
'
https://copr-be.cloud.fedoraproject.org/results/jdoss/wireguard/epel-{{ansible_distribution_major_version}}-$basearch/'
ip_resolve
:
4
gpgkey
:
"
https://copr-be.cloud.fedoraproject.org/results/jdoss/wireguard/pubkey.gpg"
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
epel
7
become
:
true
yum
:
state
:
latest
name
:
epel-release
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
<=
7"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int <= 7"
-
name
:
安装软件包 (yum)
become
:
true
yum
:
state
:
latest
update_cache
:
true
name
:
wireguard-tools,wireguard-dkms
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
<=
7"
when
:
"
ansible_
os_family
==
"RedHat"
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"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
-
name
:
安装软件包 (dnf)
become
:
true
dnf
:
state
:
latest
name
:
wireguard-tools,wireguard-dkms
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
template.yml
View file @
02fc4d2f
...
...
@@ -98,14 +98,14 @@
name
:
'
*'
update_cache
:
true
state
:
latest
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
7"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 7"
-
name
:
dnf update
become
:
true
dnf
:
name
:
'
*'
#update_cache: true
state
:
latest
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
-
name
:
fixup iptables with qemu
become
:
true
iptables
:
...
...
@@ -129,35 +129,35 @@
yum
:
state
:
latest
name
:
epel-release
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
7"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 7"
-
name
:
yum
become
:
true
yum
:
state
:
latest
name
:
curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,tcpdump,rsync,htop,mtr,net-tools,traceroute,tar,unzip,iperf,nmap,libselinux-python,open-vm-tools
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
7"
when
:
"
ansible_
os_family
==
"RedHat"
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"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
-
name
:
dnf
become
:
true
dnf
:
state
:
latest
name
:
curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,tcpdump,rsync,htop,mtr,net-tools,traceroute,tar,unzip,nmap,python3-libselinux,open-vm-tools
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
-
name
:
dnf autoremove
become
:
true
dnf
:
autoremove
:
true
when
:
"
ansible_
distribution
==
'CentOS'
and
ansible_distribution_major_version|int
==
8"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int == 8"
-
name
:
disable selinux
become
:
true
selinux
:
state
:
disabled
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
disable selinux
become
:
true
lineinfile
:
...
...
@@ -165,18 +165,18 @@
regexp
:
'
^SELINUX='
line
:
'
SELINUX=disabled'
backrefs
:
true
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
remove hwaddr in ifcfg
become
:
true
shell
:
'
sed
-i
"/HWADDR/d"
/etc/sysconfig/network-scripts/ifcfg-*'
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
set hostname to localhost
become
:
true
lineinfile
:
path
:
/etc/sysconfig/network
line
:
'
HOSTNAME=localhost.localdomain'
insertafter
:
'
EOF'
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
ssh-keygen service
become
:
true
copy
:
...
...
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