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
9d7e1d08
Commit
9d7e1d08
authored
Feb 10, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new
parent
ee93a2d8
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
58 additions
and
31 deletions
+58
-31
files/gateways/iptables-gateways-interpreter.sh
files/gateways/iptables-gateways-interpreter.sh
+12
-0
files/iptables-gateways.sh
files/iptables-gateways.sh
+0
-11
gateway.yml
gateway.yml
+16
-0
hypervisor.yml
hypervisor.yml
+2
-2
init.yml
init.yml
+12
-6
install_srvpro.yml
install_srvpro.yml
+3
-1
pter.yml
pter.yml
+1
-1
roles/docker/tasks/main.yml
roles/docker/tasks/main.yml
+1
-1
roles/mono/tasks/main.yml
roles/mono/tasks/main.yml
+1
-1
roles/nodejs/tasks/main.yml
roles/nodejs/tasks/main.yml
+1
-1
roles/wireguard/tasks/main.yml
roles/wireguard/tasks/main.yml
+1
-1
template.yml
template.yml
+6
-6
update_srvpro.yml
update_srvpro.yml
+2
-0
No files found.
files/gateways/iptables-gateways-interpreter.sh
0 → 100644
View file @
9d7e1d08
#!/bin/bash
sudo
"
$@
"
if
[
"
$1
"
==
"iptables-restore"
]
;
then
echo
"# use iptables-restore --noflush"
>
~/iptables-gateways
echo
"*nat"
>>
~/iptables-gateways
echo
":PREROUTING -"
>>
~/iptables-gateways
sudo
iptables
-t
nat
-S
PREROUTING |
grep
--
"-j DNAT"
>>
~/iptables-gateways
echo
"COMMIT"
>>
~/iptables-gateways
sudo
iptables-save
>
~/ipt
fi
files/iptables-gateways.sh
deleted
100644 → 0
View file @
ee93a2d8
#!/bin/bash
sudo
iptables
"
$@
"
echo
"# use iptables-restore --noflush"
>
~/iptables-gateways
echo
"*nat"
>>
~/iptables-gateways
echo
":PREROUTING -"
>>
~/iptables-gateways
sudo
iptables
-t
nat
-S
PREROUTING |
grep
--
"-j DNAT"
>>
~/iptables-gateways
echo
"COMMIT"
>>
~/iptables-gateways
sudo
iptables-save
>
~/ipt
gateway.yml
0 → 100644
View file @
9d7e1d08
---
-
hosts
:
iptables
remote_user
:
root
tasks
:
-
name
:
scripts
copy
:
src
:
files/gateways/{{item}}
dest
:
~/{{item}}
mode
:
0755
with_items
:
-
iptables-gateways-interpreter.sh
-
name
:
save
shell
:
'
sudo
iptables-save
>
{{item}}'
with_items
:
-
ipt
-
ipt.bak
hypervisor.yml
View file @
9d7e1d08
...
...
@@ -21,7 +21,7 @@
with_items
:
'
{{freq_list.files}}'
-
name
:
apt
become
:
true
when
:
"
ansible_
distribution
!=
'CentOS
'"
when
:
"
ansible_
os_family
==
'Debian
'"
apt
:
state
:
latest
update_cache
:
true
...
...
@@ -63,7 +63,7 @@
name
:
ksmtuned
state
:
started
enabled
:
true
when
:
"
ansible_
distribution
!=
'CentOS
'"
when
:
"
ansible_
os_family
==
'Debian
'"
-
name
:
stop firewalld
become
:
true
systemd
:
...
...
init.yml
View file @
9d7e1d08
...
...
@@ -6,7 +6,7 @@
authorized_key
:
user
:
"
{{
ansible_user_id
}}"
key
:
"
{{
lookup('file',
'../authorized_keys')
}}"
# when: "ansible_
distribution != 'CentOS
' or ansible_distribution_major_version|int != 8"
# when: "ansible_
os_family == 'Debian
' or ansible_distribution_major_version|int != 8"
-
name
:
sudoers
become
:
true
lineinfile
:
...
...
@@ -80,14 +80,14 @@
name
:
net.core.default_qdisc
value
:
fq
sysctl_set
:
true
when
:
"
ansible_
distribution
!=
'CentOS
'
or
ansible_distribution_major_version|int
>
7"
when
:
"
ansible_
os_family
==
'Debian
'
or
ansible_distribution_major_version|int
>
7"
-
name
:
TCP BBR
become
:
true
sysctl
:
name
:
net.ipv4.tcp_congestion_control
value
:
bbr
sysctl_set
:
true
when
:
"
ansible_
distribution
!=
'CentOS
'
or
ansible_distribution_major_version|int
>
7"
when
:
"
ansible_
os_family
==
'Debian
'
or
ansible_distribution_major_version|int
>
7"
-
name
:
limit
become
:
true
pam_limits
:
...
...
@@ -100,7 +100,7 @@
apt
:
update_cache
:
true
upgrade
:
dist
when
:
"
ansible_
distribution
!=
'CentOS
'"
when
:
"
ansible_
os_family
==
'Debian
'"
-
name
:
yum update
become
:
true
yum
:
...
...
@@ -127,7 +127,7 @@
update_cache
:
true
state
:
latest
name
:
curl,wget,git,vim,sudo,byobu,iftop,iotop,build-essential,p7zip-full,xclip,astyle,python-setuptools,python-dev,tcpdump,rsync,htop,locales,mtr,dnsutils,net-tools,traceroute,tar,unzip,iperf,nmap,mosh
when
:
"
ansible_
distribution
!=
'CentOS
'"
when
:
"
ansible_
os_family
==
'Debian
'"
-
name
:
Ubuntu packages
become
:
true
apt
:
...
...
@@ -146,7 +146,7 @@
become
:
true
apt
:
autoremove
:
true
when
:
"
ansible_
distribution
!=
'CentOS
'"
when
:
"
ansible_
os_family
==
'Debian
'"
-
name
:
epel
7
become
:
true
yum
:
...
...
@@ -194,6 +194,12 @@
dest
:
'
~'
creates
:
'
~/.vim'
remote_src
:
true
-
name
:
ctags link
become
:
true
file
:
src
:
/usr/bin/ctags
path
:
/usr/local/bin/ctags
state
:
link
-
name
:
git user.email
git_config
:
name
:
user.email
...
...
install_srvpro.yml
View file @
9d7e1d08
...
...
@@ -18,7 +18,7 @@
update_cache
:
true
state
:
latest
name
:
wget,git,build-essential,libreadline-dev,libsqlite3-dev,libevent-dev,redis-server,p7zip-full
when
:
"
ansible_
distribution
!=
'CentOS
'"
when
:
"
ansible_
os_family
==
'Debian
'"
-
name
:
epel
7
become
:
true
yum
:
...
...
@@ -75,6 +75,8 @@
make
:
chdir
:
'
{{home_path}}/ygopro/build'
target
:
"
config=release"
params
:
NUM_THREADS
:
'
{{ansible_processor_vcpus}}'
-
name
:
strip ygopro
shell
:
strip bin/release/ygopro
ignore_errors
:
true
...
...
pter.yml
View file @
9d7e1d08
...
...
@@ -14,7 +14,7 @@
update_cache
:
true
state
:
latest
name
:
curl,wget,build-essential,tar,unzip,python,rsync
when
:
"
ansible_
distribution
!=
'CentOS
'"
when
:
"
ansible_
os_family
==
'Debian
'"
-
name
:
yum
yum
:
state
:
latest
...
...
roles/docker/tasks/main.yml
View file @
9d7e1d08
...
...
@@ -5,7 +5,7 @@
update_cache
:
true
state
:
latest
name
:
curl,wget,apt-transport-https,lsb-release,gnupg,tar,unzip,rsync
when
:
"
ansible_
distribution
!=
'CentOS
'"
when
:
"
ansible_
os_family
==
'Debian
'"
-
name
:
Docker key
become
:
true
apt_key
:
...
...
roles/mono/tasks/main.yml
View file @
9d7e1d08
...
...
@@ -5,7 +5,7 @@
update_cache
:
true
state
:
latest
name
:
mono-complete
when
:
"
ansible_
distribution
!=
'CentOS
'"
when
:
"
ansible_
os_family
==
'Debian
'"
-
name
:
mono yum key
become
:
true
rpm_key
:
...
...
roles/nodejs/tasks/main.yml
View file @
9d7e1d08
...
...
@@ -5,7 +5,7 @@
update_cache
:
true
state
:
latest
name
:
curl,apt-transport-https,lsb-release,gnupg
when
:
"
ansible_
distribution
!=
'CentOS
'"
when
:
"
ansible_
os_family
==
'Debian
'"
-
name
:
node apt key
become
:
true
apt_key
:
...
...
roles/wireguard/tasks/main.yml
View file @
9d7e1d08
...
...
@@ -32,7 +32,7 @@
name
:
wireguard,resolvconf
state
:
latest
update_cache
:
yes
when
:
ansible_
distribution != 'CentOS
'
when
:
ansible_
os_family == 'Debian
'
-
name
:
WireGuard 源 (CentOS)
become
:
true
yum_repository
:
...
...
template.yml
View file @
9d7e1d08
...
...
@@ -7,7 +7,7 @@
copy
:
src
:
'
files/source/{{ansible_distribution|lower}}/sources.list'
dest
:
/etc/apt/sources.list
when
:
ansible_
distribution != 'CentOS
'
when
:
ansible_
os_family == 'Debian
'
-
name
:
sudoers
become
:
true
lineinfile
:
...
...
@@ -71,14 +71,14 @@
name
:
net.core.default_qdisc
value
:
fq
sysctl_set
:
true
when
:
"
ansible_
distribution
!=
'CentOS
'
or
ansible_distribution_major_version|int
>
7"
when
:
"
ansible_
os_family
==
'Debian
'
or
ansible_distribution_major_version|int
>
7"
-
name
:
TCP BBR
become
:
true
sysctl
:
name
:
net.ipv4.tcp_congestion_control
value
:
bbr
sysctl_set
:
true
when
:
"
ansible_
distribution
!=
'CentOS
'
or
ansible_distribution_major_version|int
>
7"
when
:
"
ansible_
os_family
==
'Debian
'
or
ansible_distribution_major_version|int
>
7"
-
name
:
limit
become
:
true
pam_limits
:
...
...
@@ -91,7 +91,7 @@
apt
:
update_cache
:
true
upgrade
:
dist
when
:
"
ansible_
distribution
!=
'CentOS
'"
when
:
"
ansible_
os_family
==
'Debian
'"
-
name
:
yum update
become
:
true
yum
:
...
...
@@ -118,12 +118,12 @@
update_cache
:
true
state
:
latest
name
:
curl,wget,git,vim,sudo,byobu,iftop,iotop,build-essential,p7zip-full,tcpdump,rsync,htop,locales,mtr,dnsutils,net-tools,traceroute,tar,unzip,iperf,nmap,dnsutils,open-vm-tools
when
:
"
ansible_
distribution
!=
'CentOS
'"
when
:
"
ansible_
os_family
==
'Debian
'"
-
name
:
apt autoremove
become
:
true
apt
:
autoremove
:
true
when
:
"
ansible_
distribution
!=
'CentOS
'"
when
:
"
ansible_
os_family
==
'Debian
'"
-
name
:
epel
7
become
:
true
yum
:
...
...
update_srvpro.yml
View file @
9d7e1d08
...
...
@@ -77,6 +77,8 @@
make
:
chdir
:
'
{{home_path}}/ygopro-new/build'
target
:
'
config=release'
params
:
NUM_THREADS
:
'
{{ansible_processor_vcpus}}'
-
name
:
strip ygopro
shell
:
strip bin/release/ygopro
args
:
...
...
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