增加对tsg_device_tag.json和tsg_sn.json的处理

This commit is contained in:
fumingwei
2021-05-31 16:41:59 +08:00
parent c01182433d
commit c2d4a81600
6 changed files with 40 additions and 0 deletions

View File

@@ -86,6 +86,23 @@
dest: /opt/tsg/tfe/conf/pangu/pangu_pxy.conf
tags: tfe
- name: "mkdir /opt/tsg/etc/"
file:
path: /opt/tsg/etc
state: directory
- name: "tsg-os-provision: template the tsg_device_tag"
template:
src: "../templates/tsg_device_tag.json.j2"
dest: /opt/tsg/etc/tsg_device_tag.json
tags: tsg_device_tag
- name: "tsg-os-provision: template the tsg_sn"
template:
src: "../templates/tsg_sn.json.j2"
dest: /opt/tsg/etc/tsg_sn.json
tags: tsg_sn
- name: "tsg-os-provision: snapshot the stage2 config files"
copy:
src: /data/tsg-os-provision/provision.yml

View File

@@ -0,0 +1,6 @@
---
- name: "Template the tsg_device_tag.json.j2"
template:
src: "{{ role_path }}/templates/tsg_device_tag.json.j2.j2"
dest: /opt/tsg/tsg-os-provision/templates/tsg_device_tag.json.j2
tags: template

View File

@@ -0,0 +1,4 @@
[MAAT]
{% raw %}
ACCEPT_TAGS={"tags":[{"tag":"data_center","value":"{{ data_center }}"}]}
{% endraw %}

View File

@@ -0,0 +1,6 @@
---
- name: "Template the tsg_sn.json.j2.j2"
template:
src: "{{ role_path }}/templates/tsg_sn.json.j2.j2"
dest: /opt/tsg/tsg-os-provision/templates/tsg_sn.json.j2
tags: template

View File

@@ -0,0 +1,5 @@
{
{% raw %}
"sn": "{{ tsg_sn }}"
{% endraw %}
}

View File

@@ -6,6 +6,8 @@
roles:
#- {role: init-env, tags: init-env}
- {role: tsg-os-provision, tags: tsg-os-provision}
- {role: tsg_device_tag, tags: tsg_device_tag}
- {role: tsg_sn, tags: tsg_sn}
- {role: framework, tags: framework}
#- {role: kernel-ml, tags: kernel-ml}
- {role: mrzcpd, tags: mrzcpd}