22 lines
823 B
YAML
22 lines
823 B
YAML
---
|
|
- 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
|