bugfix:删除tsg-x-p-0906环境下workload.target
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -51,4 +51,5 @@
|
||||
replace: 'WantedBy=workload.target'
|
||||
with_items:
|
||||
- /usr/lib/systemd/system/maat-redis.service
|
||||
- /usr/lib/systemd/system/maat-redis-exporter.service
|
||||
- /usr/lib/systemd/system/maat-redis-exporter.service
|
||||
when: runtime_env != 'TSG-X-P0906'
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -197,7 +197,8 @@
|
||||
regexp: 'WantedBy=multi-user.target'
|
||||
replace: 'WantedBy=workload.target'
|
||||
with_items:
|
||||
- /usr/lib/systemd/system/sapp.service
|
||||
- /usr/lib/systemd/system/sapp.service
|
||||
when: runtime_env != 'TSG-X-P0906'
|
||||
|
||||
- name: 'delete r2,r3'
|
||||
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 #####################
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user