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 @@
...
@@ -31,10 +31,10 @@
yum
:
yum
:
state
:
latest
state
:
latest
name
:
epel-release
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
-
name
:
yum
become
:
true
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
:
yum
:
state
:
latest
state
:
latest
update_cache
:
true
update_cache
:
true
...
@@ -44,10 +44,10 @@
...
@@ -44,10 +44,10 @@
dnf
:
dnf
:
state
:
latest
state
:
latest
name
:
epel-release
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
-
name
:
dnf
become
:
true
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
:
dnf
:
state
:
latest
state
:
latest
name
:
sudo,python3,qemu-kvm,qemu-img,libvirt,python3-libvirt,libguestfs-tools,virt-install,python3-lxml
name
:
sudo,python3,qemu-kvm,qemu-img,libvirt,python3-libvirt,libguestfs-tools,virt-install,python3-lxml
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
name
:
firewalld
name
:
firewalld
state
:
stopped
state
:
stopped
enabled
:
false
enabled
:
false
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
flush forward table
-
name
:
flush forward table
become
:
true
become
:
true
iptables
:
iptables
:
...
...
init.yml
View file @
02fc4d2f
...
@@ -107,14 +107,14 @@
...
@@ -107,14 +107,14 @@
name
:
'
*'
name
:
'
*'
update_cache
:
true
update_cache
:
true
state
:
latest
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
-
name
:
dnf update
become
:
true
become
:
true
dnf
:
dnf
:
name
:
'
*'
name
:
'
*'
#update_cache: true
#update_cache: true
state
:
latest
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
-
name
:
fixup iptables with qemu
become
:
true
become
:
true
iptables
:
iptables
:
...
@@ -152,42 +152,42 @@
...
@@ -152,42 +152,42 @@
yum
:
yum
:
state
:
latest
state
:
latest
name
:
epel-release
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
-
name
:
yum
become
:
true
become
:
true
yum
:
yum
:
state
:
latest
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
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
-
name
:
epel
8
become
:
true
become
:
true
dnf
:
dnf
:
state
:
latest
state
:
latest
name
:
epel-release
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
-
name
:
dnf
become
:
true
become
:
true
dnf
:
dnf
:
state
:
latest
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
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
-
name
:
dnf autoremove
become
:
true
become
:
true
dnf
:
dnf
:
autoremove
:
true
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
-
name
:
disable selinux
become
:
true
become
:
true
selinux
:
selinux
:
state
:
disabled
state
:
disabled
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
disable selinux
-
name
:
disable selinux
lineinfile
:
lineinfile
:
path
:
/etc/selinux/config
path
:
/etc/selinux/config
regexp
:
'
^SELINUX='
regexp
:
'
^SELINUX='
line
:
'
SELINUX=disabled'
line
:
'
SELINUX=disabled'
backrefs
:
true
backrefs
:
true
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
vim
-
name
:
vim
unarchive
:
unarchive
:
src
:
https://minio.mycard.moe:9000/nanahira/nanahira-vim.tar.gz
src
:
https://minio.mycard.moe:9000/nanahira/nanahira-vim.tar.gz
...
...
install_srvpro.yml
View file @
02fc4d2f
...
@@ -25,26 +25,26 @@
...
@@ -25,26 +25,26 @@
state
:
latest
state
:
latest
update_cache
:
true
update_cache
:
true
name
:
epel-release,curl
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
-
name
:
yum
become
:
true
become
:
true
yum
:
yum
:
state
:
latest
state
:
latest
update_cache
:
true
update_cache
:
true
name
:
wget,git,gcc,gcc-c++,make,sqlite-devel,readline-devel,openssl-devel,libevent-devel,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"
when
:
"
ansible_
os_family
==
"RedHat"
and ansible_distribution_major_version|int <= 7"
-
name
:
epel
8
-
name
:
epel
8
become
:
true
become
:
true
dnf
:
dnf
:
state
:
latest
state
:
latest
name
:
epel-release
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
-
name
:
dnf
become
:
true
become
:
true
dnf
:
dnf
:
state
:
latest
state
:
latest
name
:
curl,wget,gcc,gcc-c++,make,sqlite-devel,readline-devel,openssl-devel,libevent-devel,redis,p7zip,p7zip-plugins,tar,unzip
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
-
name
:
pre data
git
:
git
:
repo
:
'
https://git.dev.tencent.com/mercury233/ygopro-pre-data.git'
repo
:
'
https://git.dev.tencent.com/mercury233/ygopro-pre-data.git'
...
@@ -191,7 +191,7 @@
...
@@ -191,7 +191,7 @@
name
:
firewalld
name
:
firewalld
state
:
stopped
state
:
stopped
enabled
:
false
enabled
:
false
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
redis
-
name
:
redis
become
:
true
become
:
true
systemd
:
systemd
:
...
...
pter.yml
View file @
02fc4d2f
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
state
:
latest
state
:
latest
update_cache
:
true
update_cache
:
true
name
:
curl,wget,gcc,gcc-c++,make,tar,unzip,python,rsync
name
:
curl,wget,gcc,gcc-c++,make,tar,unzip,python,rsync
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
directories
-
name
:
directories
file
:
file
:
path
:
'
/srv/{{item}}'
path
:
'
/srv/{{item}}'
...
...
roles/docker/tasks/main.yml
View file @
02fc4d2f
...
@@ -43,13 +43,13 @@
...
@@ -43,13 +43,13 @@
state
:
latest
state
:
latest
update_cache
:
true
update_cache
:
true
name
:
epel-release
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
-
name
:
docker from yum
yum
:
yum
:
state
:
latest
state
:
latest
update_cache
:
true
update_cache
:
true
name
:
rsync,tar,unzip,docker,python-pip
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
-
name
:
systemd
become
:
true
become
:
true
systemd
:
systemd
:
...
...
roles/mono/tasks/main.yml
View file @
02fc4d2f
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
become
:
true
become
:
true
rpm_key
:
rpm_key
:
key
:
'
http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x3fa7e0328081bff6a14da29aa6a19b38d3d831ef'
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
-
name
:
mono yum source
become
:
true
become
:
true
yum_repository
:
yum_repository
:
...
@@ -19,17 +19,17 @@
...
@@ -19,17 +19,17 @@
baseurl
:
'
https://download.mono-project.com/repo/centos{{ansible_distribution_major_version}}-stable/'
baseurl
:
'
https://download.mono-project.com/repo/centos{{ansible_distribution_major_version}}-stable/'
ip_resolve
:
4
ip_resolve
:
4
gpgkey
:
"
https://download.mono-project.com/repo/xamarin.gpg"
gpgkey
:
"
https://download.mono-project.com/repo/xamarin.gpg"
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
mono from yum
-
name
:
mono from yum
become
:
true
become
:
true
yum
:
yum
:
state
:
latest
state
:
latest
update_cache
:
true
update_cache
:
true
name
:
mono-complete
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
-
name
:
mono from dnf
become
:
true
become
:
true
dnf
:
dnf
:
state
:
latest
state
:
latest
name
:
mono-complete
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 @@
...
@@ -38,26 +38,26 @@
state
:
latest
state
:
latest
update_cache
:
true
update_cache
:
true
name
:
epel-release
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
-
name
:
nodejs from yum
become
:
true
become
:
true
yum
:
yum
:
state
:
latest
state
:
latest
update_cache
:
true
update_cache
:
true
name
:
npm
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
-
name
:
epel
8
become
:
true
become
:
true
dnf
:
dnf
:
state
:
latest
state
:
latest
name
:
epel-release
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
-
name
:
nodejs from dnf
become
:
true
become
:
true
dnf
:
dnf
:
state
:
latest
state
:
latest
name
:
nodejs,npm
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
-
name
:
npm
become
:
true
become
:
true
npm
:
npm
:
...
...
roles/wireguard/tasks/main.yml
View file @
02fc4d2f
...
@@ -41,29 +41,29 @@
...
@@ -41,29 +41,29 @@
baseurl
:
'
https://copr-be.cloud.fedoraproject.org/results/jdoss/wireguard/epel-{{ansible_distribution_major_version}}-$basearch/'
baseurl
:
'
https://copr-be.cloud.fedoraproject.org/results/jdoss/wireguard/epel-{{ansible_distribution_major_version}}-$basearch/'
ip_resolve
:
4
ip_resolve
:
4
gpgkey
:
"
https://copr-be.cloud.fedoraproject.org/results/jdoss/wireguard/pubkey.gpg"
gpgkey
:
"
https://copr-be.cloud.fedoraproject.org/results/jdoss/wireguard/pubkey.gpg"
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
epel
7
-
name
:
epel
7
become
:
true
become
:
true
yum
:
yum
:
state
:
latest
state
:
latest
name
:
epel-release
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)
-
name
:
安装软件包 (yum)
become
:
true
become
:
true
yum
:
yum
:
state
:
latest
state
:
latest
update_cache
:
true
update_cache
:
true
name
:
wireguard-tools,wireguard-dkms
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
-
name
:
epel
8
become
:
true
become
:
true
dnf
:
dnf
:
state
:
latest
state
:
latest
name
:
epel-release
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)
-
name
:
安装软件包 (dnf)
become
:
true
become
:
true
dnf
:
dnf
:
state
:
latest
state
:
latest
name
:
wireguard-tools,wireguard-dkms
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 @@
...
@@ -98,14 +98,14 @@
name
:
'
*'
name
:
'
*'
update_cache
:
true
update_cache
:
true
state
:
latest
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
-
name
:
dnf update
become
:
true
become
:
true
dnf
:
dnf
:
name
:
'
*'
name
:
'
*'
#update_cache: true
#update_cache: true
state
:
latest
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
-
name
:
fixup iptables with qemu
become
:
true
become
:
true
iptables
:
iptables
:
...
@@ -129,35 +129,35 @@
...
@@ -129,35 +129,35 @@
yum
:
yum
:
state
:
latest
state
:
latest
name
:
epel-release
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
-
name
:
yum
become
:
true
become
:
true
yum
:
yum
:
state
:
latest
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
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
-
name
:
epel
8
become
:
true
become
:
true
dnf
:
dnf
:
state
:
latest
state
:
latest
name
:
epel-release
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
-
name
:
dnf
become
:
true
become
:
true
dnf
:
dnf
:
state
:
latest
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
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
-
name
:
dnf autoremove
become
:
true
become
:
true
dnf
:
dnf
:
autoremove
:
true
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
-
name
:
disable selinux
become
:
true
become
:
true
selinux
:
selinux
:
state
:
disabled
state
:
disabled
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
disable selinux
-
name
:
disable selinux
become
:
true
become
:
true
lineinfile
:
lineinfile
:
...
@@ -165,18 +165,18 @@
...
@@ -165,18 +165,18 @@
regexp
:
'
^SELINUX='
regexp
:
'
^SELINUX='
line
:
'
SELINUX=disabled'
line
:
'
SELINUX=disabled'
backrefs
:
true
backrefs
:
true
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
remove hwaddr in ifcfg
-
name
:
remove hwaddr in ifcfg
become
:
true
become
:
true
shell
:
'
sed
-i
"/HWADDR/d"
/etc/sysconfig/network-scripts/ifcfg-*'
shell
:
'
sed
-i
"/HWADDR/d"
/etc/sysconfig/network-scripts/ifcfg-*'
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
set hostname to localhost
-
name
:
set hostname to localhost
become
:
true
become
:
true
lineinfile
:
lineinfile
:
path
:
/etc/sysconfig/network
path
:
/etc/sysconfig/network
line
:
'
HOSTNAME=localhost.localdomain'
line
:
'
HOSTNAME=localhost.localdomain'
insertafter
:
'
EOF'
insertafter
:
'
EOF'
when
:
"
ansible_
distribution
==
'CentOS'
"
when
:
"
ansible_
os_family
==
"RedHat"
"
-
name
:
ssh-keygen service
-
name
:
ssh-keygen service
become
:
true
become
:
true
copy
:
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