pwgen: fix docker output

This commit is contained in:
ace 2023-02-10 14:00:34 +03:00
parent 780ab36c0c
commit 3033c2f02b
Signed by: ace
GPG Key ID: 2C08973DD37A76FD
2 changed files with 5 additions and 2 deletions

View File

@ -42,5 +42,5 @@
- name: Write htpasswd hash for {{ item.name }}
lineinfile:
path: "{{ inventory_dir }}/group_vars/all/passwords.yaml"
line: "{{ item.name }}_htpasswd_hash: \"{{ docker_container_output.ansible_facts.docker_container.Output.split('\n')[0].split(':')[1] }}\""
line: "{{ item.name }}_htpasswd_hash: \"{{ docker_container_output.container.Output.split('\n')[0].split(':')[1] }}\""
when: htpasswd_hash_test_grep.stdout == '0'

View File

@ -28,6 +28,9 @@
register: docker_container_output
when: pbkdf2_sha512_hash_test_grep.stdout == '0'
- debug:
msg: "{{ docker_container_output }}"
- name: Show docker_container_output for {{ item.name }}
debug:
msg: "{{ docker_container_output }}"
@ -42,5 +45,5 @@
- name: Write PBKDF2-SHA512 hash for {{ item.name }}
lineinfile:
path: "{{ inventory_dir }}/group_vars/all/passwords.yaml"
line: "{{ item.name }}_pbkdf2_sha512_hash: \"{{ docker_container_output.ansible_facts.docker_container.Output.split('\n')[0] }}\""
line: "{{ item.name }}_pbkdf2_sha512_hash: \"{{ docker_container_output.container.Output.split('\n')[0] }}\""
when: pbkdf2_sha512_hash_test_grep.stdout == '0'