Ansible Script 추가
This commit is contained in:
21
ansible/01_old/roles/connect-settings/tasks/03_vault.yml
Normal file
21
ansible/01_old/roles/connect-settings/tasks/03_vault.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: Check if ansible_port is defined
|
||||
set_fact:
|
||||
ansible_port: "{{ ansible_port | default(22) }}"
|
||||
|
||||
- debug:
|
||||
msg: "{{ ansible_distribution }} {{ ansible_hostname }} {{ ansible_default_ipv4.address }} {{ ansible_port }} {{ username }} {{ user_password }} {{ adminuser }} {{ admin_password }}"
|
||||
when: debug_mode == True
|
||||
|
||||
- name: put vault
|
||||
command: "{{ role_path }}/files/vault_put {{ ansible_default_ipv4.address }} {{ username }} {{ user_password }} {{ adminuser }} {{ admin_password }}"
|
||||
delegate_to: 127.0.0.1
|
||||
|
||||
- name: get vault
|
||||
command: "{{ role_path }}/files/vault_get {{ ansible_default_ipv4.address }} {{ username }} {{ user_password }} {{ adminuser }} {{ admin_password }}"
|
||||
register: get_vault
|
||||
delegate_to: 127.0.0.1
|
||||
|
||||
- debug:
|
||||
msg: "{{get_vault.stdout_lines}}"
|
||||
when: debug_mode == True
|
||||
Reference in New Issue
Block a user