ansible运行时使用/etc/hosts文件

This commit is contained in:
fumingwei
2021-05-17 17:34:37 +08:00
parent 98c7ef4938
commit 70145e4d48
2 changed files with 9 additions and 0 deletions

View File

@@ -47,7 +47,10 @@ sysroot-verfile: sysroot-base
sysroot-ansible: sysroot-verfile sysroot-base
cp $(CONFDIR)/yum.conf $(TARGET_SYSROOT_DIR)/tmp/ -r
cp $(CONFDIR)/resolv.conf $(TARGET_SYSROOT_DIR)/etc/ -r
cp $(TARGET_SYSROOT_DIR)/etc/hosts $(TARGET_SYSROOT_DIR)/tmp/ -r
cp /etc/hosts $(TARGET_SYSROOT_DIR)/etc/ -r
$(TOOLSDIR)/ansible-stage-one $(PROFILE_ID) $(PROJECTDIR) $(TARGET_SYSROOT_DIR) /tmp/yum.conf
cp $(TARGET_SYSROOT_DIR)/tmp/hosts $(TARGET_SYSROOT_DIR)/etc/ -r
sysroot-cleanup:
rm -rf $(TARGET_SYSROOT_DIR)/tmp/*

View File

@@ -52,6 +52,12 @@
dest: /etc/tmpfiles.d/sapp_tmpfile.conf
tags: template
- name: Template the gdev.conf
template:
src: "{{ role_path }}/templates/gdev.conf.j2"
dest: /home/mesasoft/sapp_run/etc/gdev.conf
tags: template
- name: "sapp: service adapts runtimes"
template:
src: "{{ role_path }}/templates/adapt_runtimes.j2"