Skip to content

Instantly share code, notes, and snippets.

@norberttech
Created May 7, 2014 13:34
Show Gist options
  • Save norberttech/428b1cd6582eef906b5c to your computer and use it in GitHub Desktop.
Save norberttech/428b1cd6582eef906b5c to your computer and use it in GitHub Desktop.
- name: MySQL | Set the root password.
mysql_user:
user: root
host: "{{ item }}"
password: "{{ mysql_root_db_pass }}"
with_items:
- "{{ ansible_hostname }}"
- 127.0.0.1
- ::1
- localhost
when: ansible_hostname != 'localhost'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment