将tsg-env迁移至tsg-scripts project
This commit is contained in:
1
roles/tsg-common-files/.gitignore
vendored
Normal file
1
roles/tsg-common-files/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
__pycache__
|
||||
0
roles/tsg-common-files/此文件夹存放rpm包_最终版再push到git.txt
Normal file
0
roles/tsg-common-files/此文件夹存放rpm包_最终版再push到git.txt
Normal file
@@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
ifconfig ens1 up
|
||||
|
||||
modprobe 8021q
|
||||
vconfig add ens1 100
|
||||
vconfig set_flag ens1.100 1 1
|
||||
ifconfig ens1.100 192.168.100.1 netmask 255.255.255.0 up
|
||||
|
||||
echo 0 > /sys/class/net/ens1/device/sriov_numvfs
|
||||
sleep 1
|
||||
echo 8 > /sys/class/net/ens1/device/sriov_numvfs
|
||||
sleep 1
|
||||
|
||||
ifconfig ens1f3 up
|
||||
ip link set ens1 vf 2 vlan 200
|
||||
ifconfig ens1f3 192.168.200.1 netmask 255.255.255.0
|
||||
|
||||
ifconfig enp7s0 up
|
||||
ifconfig enp8s0 up
|
||||
ifconfig ens1f1 up
|
||||
ifconfig ens1f2 up
|
||||
ifconfig ens1f3 up
|
||||
ifconfig ens1f4 up
|
||||
ifconfig ens1f5 up
|
||||
ifconfig ens1f6 up
|
||||
ifconfig ens1f7 up
|
||||
ifconfig enp1s1 up
|
||||
@@ -1,18 +0,0 @@
|
||||
[Unit]
|
||||
Description=tsg env init
|
||||
Requires=network.target
|
||||
After=network.target
|
||||
Before=mrenv.service
|
||||
|
||||
[Service]
|
||||
#WorkingDirectory=/opt/tsg/env
|
||||
ExecStart=/opt/tsg/env/setup
|
||||
#ExecStop=/home/tsg/kni/kni_service_scipt stop
|
||||
#ExecStop=/bin/kill -9 $MAINPID
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
#Restart=always
|
||||
#RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
- name: "copy setup.sh"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/setup"
|
||||
dest: "/opt/tsg/env/"
|
||||
mode: 0755
|
||||
|
||||
- name: "copy tsg-env.service"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/tsg-env.service"
|
||||
dest: "/usr/lib/systemd/system/"
|
||||
mode: 0644
|
||||
|
||||
- name: "enable tsg-env"
|
||||
systemd:
|
||||
name: tsg-env
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
ifconfig ens1 up
|
||||
|
||||
|
||||
modprobe 8021q
|
||||
vconfig add ens1 100
|
||||
vconfig set_flag ens1.100 1 1
|
||||
ifconfig ens1.100 192.168.100.2 netmask 255.255.255.0 up
|
||||
|
||||
echo 0 > /sys/class/net/ens1/device/sriov_numvfs
|
||||
sleep 1
|
||||
echo 3 > /sys/class/net/ens1/device/sriov_numvfs
|
||||
sleep 1
|
||||
|
||||
ifconfig ens1f3 up
|
||||
ip link set ens1 vf 2 vlan 200
|
||||
ifconfig ens1f3 192.168.200.2 netmask 255.255.255.0
|
||||
|
||||
ifconfig enp7s0 up
|
||||
ifconfig enp8s0 up
|
||||
ifconfig ens1f1 up
|
||||
ifconfig ens1f2 up
|
||||
ifconfig ens1f3 up
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
[Unit]
|
||||
Description=tsg env init
|
||||
Requires=network.target
|
||||
After=network.target
|
||||
Before=mrenv.service
|
||||
|
||||
[Service]
|
||||
#WorkingDirectory=/opt/tsg/env
|
||||
ExecStart=/opt/tsg/env/setup
|
||||
#ExecStop=/home/tsg/kni/kni_service_scipt stop
|
||||
#ExecStop=/bin/kill -9 $MAINPID
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
#Restart=always
|
||||
#RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
- name: "copy setup.sh"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/setup"
|
||||
dest: "/opt/tsg/env/"
|
||||
mode: 0755
|
||||
|
||||
- name: "copy tsg-env.service"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/tsg-env.service"
|
||||
dest: "/usr/lib/systemd/system/"
|
||||
mode: 0644
|
||||
|
||||
- name: "enable tsg-env"
|
||||
systemd:
|
||||
name: tsg-env
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
ifconfig ens8 up
|
||||
|
||||
modprobe 8021q
|
||||
vconfig add ens8 100
|
||||
vconfig set_flag ens8.100 1 1
|
||||
ifconfig ens8.100 192.168.100.3 netmask 255.255.255.0 up
|
||||
|
||||
echo 0 > /sys/class/net/ens8/device/sriov_numvfs
|
||||
sleep 1
|
||||
echo 3 > /sys/class/net/ens8/device/sriov_numvfs
|
||||
sleep 1
|
||||
|
||||
ifconfig ens8f3 up
|
||||
ip link set ens8 vf 2 vlan 200
|
||||
ifconfig ens8f3 192.168.200.3 netmask 255.255.255.0
|
||||
|
||||
ifconfig enp7s0 up
|
||||
ifconfig enp8s0 up
|
||||
ifconfig ens8f1 up
|
||||
ifconfig ens8f2 up
|
||||
ifconfig ens8f3 up
|
||||
ifconfig ens8f4 up
|
||||
@@ -1,18 +0,0 @@
|
||||
[Unit]
|
||||
Description=tsg env init
|
||||
Requires=network.target
|
||||
After=network.target
|
||||
Before=mrenv.service
|
||||
|
||||
[Service]
|
||||
#WorkingDirectory=/opt/tsg/env
|
||||
ExecStart=/opt/tsg/env/setup
|
||||
#ExecStop=/home/tsg/kni/kni_service_scipt stop
|
||||
#ExecStop=/bin/kill -9 $MAINPID
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
#Restart=always
|
||||
#RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
- name: "copy setup.sh"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/setup"
|
||||
dest: "/opt/tsg/env/"
|
||||
mode: 0755
|
||||
|
||||
- name: "copy tsg-env.service"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/tsg-env.service"
|
||||
dest: "/usr/lib/systemd/system/"
|
||||
mode: 0644
|
||||
|
||||
- name: "enable tsg-env"
|
||||
systemd:
|
||||
name: tsg-env
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
ifconfig ens8 up
|
||||
|
||||
modprobe 8021q
|
||||
vconfig add ens8 100
|
||||
vconfig set_flag ens8.100 1 1
|
||||
ifconfig ens8.100 192.168.100.4 netmask 255.255.255.0 up
|
||||
|
||||
echo 0 > /sys/class/net/ens8/device/sriov_numvfs
|
||||
sleep 1
|
||||
echo 3 > /sys/class/net/ens8/device/sriov_numvfs
|
||||
sleep 1
|
||||
|
||||
ifconfig ens8f3 up
|
||||
ip link set ens8 vf 2 vlan 200
|
||||
ifconfig ens8f3 192.168.200.4 netmask 255.255.255.0
|
||||
ifconfig enp7s0 up
|
||||
ifconfig enp8s0 up
|
||||
ifconfig ens8f1 up
|
||||
ifconfig ens8f2 up
|
||||
ifconfig ens8f3 up
|
||||
@@ -1,18 +0,0 @@
|
||||
[Unit]
|
||||
Description=tsg env init
|
||||
Requires=network.target
|
||||
After=network.target
|
||||
Before=mrenv.service
|
||||
|
||||
[Service]
|
||||
#WorkingDirectory=/opt/tsg/env
|
||||
ExecStart=/opt/tsg/env/setup
|
||||
#ExecStop=/home/tsg/kni/kni_service_scipt stop
|
||||
#ExecStop=/bin/kill -9 $MAINPID
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
#Restart=always
|
||||
#RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
- name: "copy setup.sh"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/setup"
|
||||
dest: "/opt/tsg/env/"
|
||||
mode: 0755
|
||||
|
||||
- name: "copy tsg-env.service"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/tsg-env.service"
|
||||
dest: "/usr/lib/systemd/system/"
|
||||
mode: 0644
|
||||
|
||||
- name: "enable tsg-env"
|
||||
systemd:
|
||||
name: tsg-env
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
@@ -6,19 +6,18 @@
|
||||
- hosts: sled-mcn0
|
||||
roles:
|
||||
- tsg-cli-mcn0
|
||||
- tsg-env-mcn0
|
||||
|
||||
|
||||
- hosts: sled-mcn1
|
||||
roles:
|
||||
- tsg-cli-mcn1-3
|
||||
- tsg-env-mcn1
|
||||
|
||||
|
||||
- hosts: sled-mcn2
|
||||
roles:
|
||||
- tsg-cli-mcn1-3
|
||||
- tsg-env-mcn2
|
||||
|
||||
|
||||
- hosts: sled-mcn3
|
||||
roles:
|
||||
- tsg-cli-mcn1-3
|
||||
- tsg-env-mcn3
|
||||
Reference in New Issue
Block a user