|
|
---
|
|
|
# 修改腾讯云DSA自有源站地址
|
|
|
# switch java to aws
|
|
|
#
|
|
|
|
|
|
- hosts: localhost
|
|
|
vars_prompt:
|
|
|
- name: "domain_name"
|
|
|
prompt: "DSA domain name"
|
|
|
private: no
|
|
|
|
|
|
- name: "new_origin"
|
|
|
prompt: "New DSA origin address"
|
|
|
vars_prompt:
|
|
|
- name: "confirmation"
|
|
|
prompt: "Modify DNS record . Please Enter YES to continue."
|
|
|
private: no
|
|
|
|
|
|
vars_files:
|
|
|
- extra_vars/all.yml
|
|
|
- extra_vars/all.yml
|
|
|
|
|
|
vars:
|
|
|
qcloud_key: "{{ lookup('hashi_vault', 'secret=yoho/ops/qcloud token='+'{{vault.token}}'+' url='+'{{vault.server}}') }}"
|
|
|
|
|
|
tasks:
|
|
|
- name: 修改DSA自有源站地址
|
|
|
modify_dsa_origin:
|
|
|
- name: "make sure user type YES to confirm"
|
|
|
fail:
|
|
|
msg: "user do not type YES"
|
|
|
when: confirmation != 'YES'
|
|
|
|
|
|
- name: 修改域名映射的IP或CNAME
|
|
|
domain_modify:
|
|
|
secretId: "{{ qcloud_key.SecretId }}"
|
|
|
secretKey: "{{ qcloud_key.SecretKey }}"
|
|
|
domain_name: "{{ domain_name }}"
|
|
|
new_origin: "{{ new_origin }}" |
|
|
domain_name: "{{ domain_name }}"
|
|
|
value: "{{ new_record }}" |
...
|
...
|
|