Authored by chunhua.zhang

add global var

@@ -7,3 +7,7 @@ yoho_office_ips: @@ -7,3 +7,7 @@ yoho_office_ips:
7 - 106.39.86.228 7 - 106.39.86.228
8 - 106.39.86.226 8 - 106.39.86.226
9 - 106.38.38.147 9 - 106.38.38.147
  10 +
  11 +vault:
  12 + server: 'http://10.66.107.2:8200'
  13 + token: '27CLyZvYcqawMn7UALUMzRbH'
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 --- 5 ---
6 - hosts: 127.0.0.1 6 - hosts: 127.0.0.1
7 vars: 7 vars:
8 - qcloud_key: "{{ lookup('hashi_vault', 'secret=yoho/ops/qcloud token=27CLyZvYcqawMn7UALUMzRbH url=http://10.66.107.2:8200') }}" 8 + qcloud_key: "{{ lookup('hashi_vault', 'secret=yoho/ops/qcloud token=27CLyZvYcqawMn7UALUMzRbH url={{vault.server}}') }}"
9 tasks: 9 tasks:
10 - name: Installing pip modules for using vault lookup 10 - name: Installing pip modules for using vault lookup
11 pip: name={{item}} 11 pip: name={{item}}