Guest User

Untitled

a guest
Oct 9th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. - name: Create DB User
  2. mysql_user:
  3. name: dbuser
  4. host: "{{ item }}"
  5. password: "{{ mysql_wordpress_password }}"
  6. priv: "someDB.*:ALL"
  7. with_items:
  8. - "{{ ansible_hostname }}"
  9. - 127.0.0.1
  10. - ::1
  11. - localhost
  12. - "{{ hostvars[groups['webservers']] }}"
  13.  
  14. TASK [dbservers : Create DB User] *******************************************************************************************************************************************************************
  15. fatal: [10.10.10.13]: FAILED! => {"msg": "ansible.vars.hostvars.HostVars object has no element [u'10.10.10.30', u'10.10.10.240']"}
  16.  
  17. [webservers]
  18. 10.10.10.30
  19. 10.10.10.240
Add Comment
Please, Sign In to add comment