Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Commit

Permalink
specify lengths for generated passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric OCallaghan committed Mar 6, 2019
1 parent 65f52d2 commit 56f8662
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/mysql/tasks/main.yaml
Expand Up @@ -37,8 +37,8 @@
- name: Generate passwords
set_fact:
zabbix_admin_password: "{{ lookup('password', '/dev/null chars=ascii_letters,digits length=12') }}"
zabbix_mysql_password: "{{ lookup('password', '/dev/null chars=ascii_letters,digits') }}"
root_mysql_password: "{{ lookup('password', '/dev/null chars=ascii_letters,digits') }}"
zabbix_mysql_password: "{{ lookup('password', '/dev/null chars=ascii_letters,digits length=20') }}"
root_mysql_password: "{{ lookup('password', '/dev/null chars=ascii_letters,digits length=24') }}"

- name: Template MySQL query to update Zabbix web administrator password and disable guests
template:
Expand Down

1 comment on commit 56f8662

@ericoc
Copy link
Member

@ericoc ericoc commented on 56f8662 Mar 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two password lookups generated the same password on a DigitalOcean droplet that I was testing with (with a default length of 20). Specifying length manually cleared up the problem and now I am getting unique passwords. See ansible/ansible#34144

Please sign in to comment.