1
This commit is contained in:
parent
dd284f76a7
commit
f2a73368ff
File diff suppressed because one or more lines are too long
10
role/shanhai/files/pay.py
Normal file
10
role/shanhai/files/pay.py
Normal 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)
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user