This commit is contained in:
wuaho 2021-07-22 11:28:34 +08:00
parent dd284f76a7
commit f2a73368ff
3 changed files with 18 additions and 718 deletions

File diff suppressed because one or more lines are too long

10
role/shanhai/files/pay.py Normal file
View File

@ -0,0 +1,10 @@
import json
res = {
'paycon': {'default': None}
}
with open('pay.json', 'r', encoding='utf8') as f:
res['paycon']['default'] = json.load(f)
with open('pay.json', 'w', encoding='utf8') as f:
json.dump(res, f)

View File

@ -2,13 +2,19 @@
- name: 下载 pay - name: 下载 pay
local_action: subversion local_action: subversion
args: args:
repo: "{{svn}}/shanhai/trunk/server/json/pay.json" repo: "{{svn}}/shanhai/trunk/server/pay/default.json"
dest: "{{ansible_role_name}}/files/pay.json" dest: "{{ansible_role_name}}/files/pay.json"
username: "{{username}}" username: "{{username}}"
password: "{{password}}" password: "{{password}}"
export: yes export: yes
force: yes force: yes
- name: 处理pay
local_action: shell
args:
chdir: "{{ansible_role_name}}/files/"
cmd: "python3 pay.py"
- name: 拷贝到gm - name: 拷贝到gm
copy: copy:
src: pay.json src: pay.json