Hi all
Run into a bit of a problem when trying to run this command inside a docker
container:
*CREATE USER '{{ item.user }}'@'%' IDENTIFIED BY '{{ item.password }}';*
this is what I've done but it's not working. Does anybody see where I'm
going wrong? (where mysql in the example command-line is the container name)
*- name: Build the environment*
* hosts: server1*
* tasks*
* - name: create db users via command line*
* shell: "docker exec -i mysql sh -c 'mysql -u root -e \"CREATE USER
'{{ item.user }}'@'%' IDENTIFIED BY '{{ item.password }}';\" ' "*
* with_items:*
* - { user: "user1", password: "aaaaaaaaa", db: "db1" }*
* - { user: "user2", password: "bbbbbbbbb", db: "db2" }*
* - { user: "user3", password: "cccccccccc", db: "db3" }*
Hope you can point me in the right direction
Regards
John
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/dcfffe3b-cb6f-4e4a-a85c-abbd5ff2b7be%40googlegroups.com.