bugfix:删除tsg-x-p-0906环境下workload.target

This commit is contained in:
fumingwei
2022-09-01 15:19:42 +08:00
parent ff95e2c4a8
commit 391d14d471
11 changed files with 24 additions and 6 deletions

View File

@@ -87,6 +87,7 @@
with_items:
- /usr/lib/systemd/system/cert-redis.service
- /usr/lib/systemd/system/certstore.service
when: runtime_env != 'TSG-X-P0906'
- name: "replace action: close redis-server daemonize TSG-X-0906"
replace:

View File

@@ -123,6 +123,7 @@
with_items:
- /usr/lib/systemd/system/exporter-node.service
- /usr/lib/systemd/system/exporter-systemd.service
when: runtime_env != 'TSG-X-P0906'
- name: "replace action: replace service WantedBy from multi-user.target to workload.target"
replace:
@@ -131,7 +132,9 @@
replace: 'WantedBy=workload.target'
with_items:
- /usr/lib/systemd/system/exporter-ipmi.service
when: monitor.enable_ipmi_exporter == 1
when:
- monitor.enable_ipmi_exporter == 1
- runtime_env != 'TSG-X-P0906'
##################### exporter #####################
- name: 'exporter-node service start'

View File

@@ -52,3 +52,4 @@
with_items:
- /usr/lib/systemd/system/maat-redis.service
- /usr/lib/systemd/system/maat-redis-exporter.service
when: runtime_env != 'TSG-X-P0906'

View File

@@ -119,6 +119,7 @@
- /usr/lib/systemd/system/mrenv.service
- /usr/lib/systemd/system/mrtunnat.service
- /usr/lib/systemd/system/mrzcpd.service
when: runtime_env != 'TSG-X-P0906'
- name: "replace action: replace service unit Requires and after option, TSG-X-0906"
replace:

View File

@@ -198,6 +198,7 @@
replace: 'WantedBy=workload.target'
with_items:
- /usr/lib/systemd/system/sapp.service
when: runtime_env != 'TSG-X-P0906'
- name: 'delete r2,r3'
file:

View File

@@ -43,6 +43,7 @@
replace: 'WantedBy=workload.target'
with_items:
- /usr/lib/systemd/system/telegraf_statistic.service
when: runtime_env != 'TSG-X-P0906'
##################### telegraf #####################

View File

@@ -108,6 +108,7 @@
with_items:
- /usr/lib/systemd/system/tfe-env.service
- /usr/lib/systemd/system/tfe.service
when: runtime_env != 'TSG-X-P0906'
- name: "template the pangu_pxy.conf"
template:

View File

@@ -55,6 +55,7 @@
replace: 'WantedBy=workload.target'
with_items:
- /usr/lib/systemd/system/tsg-diagnose.service
when: runtime_env != 'TSG-X-P0906'
- name: "add sudo secure_path"
lineinfile:

View File

@@ -42,6 +42,7 @@
replace: 'WantedBy=workload.target'
with_items:
- /usr/lib/systemd/system/exporter-proxy.service
when: runtime_env != 'TSG-X-P0906'
- name: 'exporter-proxy service start'
systemd:

View File

@@ -1,5 +1,6 @@
- name: "set system default.target"
shell: ln -vfs /usr/lib/systemd/system/workload.target /etc/systemd/system/default.target
when: runtime_env != 'TSG-X-P0906'
- name: "tsg-os-provision: build tsg-os-provision directory and sub directory"
file:

View File

@@ -138,9 +138,15 @@ if [ ! -f "$target/etc/pam.d/password-auth-local" ]; then
ln -vfs --relative $target/etc/pam.d/password-auth-local $target/etc/pam.d/password-auth
fi
cp -rf $projectdir/rootconf/sysroot-usr/target/* $target/usr/lib/systemd/system
mkdir -p $target/usr/lib/systemd/system/workload.target.wants
case $profile_id in
"TSG-X-NXR620G40-R01-P0804" | "TSG-X-NXR620G40-R01-P1403" | "7400-MCN0-P01R01" | "7400-MCN123-P01R01" |"9000-NPB-P01R01")
cp -rf $projectdir/rootconf/sysroot-usr/target/* $target/usr/lib/systemd/system
mkdir -p $target/usr/lib/systemd/system/workload.target.wants
;;
*)
echo "Profile_id: $profile_id not need workload.target"
;;
esac
# ansible-playbook -i tsg-9140-scripts/install_config/tsg_9140_host tsg-9140-scripts/tsg_9140_deploy.yml
yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt clean all