Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- -
- hosts: localhost
- connection: local
- vars:
- nullvar: null
- nullarr:
- - null
- nullindirectarr:
- - pw: null
- rootpw: test
- tasks:
- - name: Create mysql database
- mysql_db:
- login_user: root
- login_password: "{{ rootpw }}"
- name: test
- - name: Create mysql user with pw abc
- mysql_user:
- login_user: root
- login_password: "{{ rootpw }}"
- password: abc
- name: user1
- priv: "test.*:ALL"
- host: localhost
- - name: Change priv only. Dont change pw.
- mysql_user:
- login_user: root
- login_password: "{{ rootpw }}"
- password: null
- name: user1
- priv: "*.*:ALL"
- host: localhost
- - name: is pw still the same? Green yes, orange no (is green)
- mysql_user:
- login_user: root
- login_password: "{{ rootpw }}"
- password: abc
- name: user1
- host: localhost
- - name: Doesnt change a thing
- mysql_user:
- login_user: root
- login_password: "{{ rootpw }}"
- password: null
- name: user1
- priv: "*.*:ALL"
- host: localhost
- - name: is pw still the same? Green yes, orange no (is green)
- mysql_user:
- login_user: root
- login_password: "{{ rootpw }}"
- password: abc
- name: user1
- host: localhost
- - name: Shouldnt change a thing but does
- mysql_user:
- login_user: root
- login_password: "{{ rootpw }}"
- password: "{{ nullvar }}"
- #password: nullvar #Doesnt' work...
- #password: $nullvar #Doesnt' work...
- name: user1
- priv: "*.*:ALL"
- host: localhost
- - name: is pw still the same? Green yes, orange no (is orange)
- mysql_user:
- login_user: root
- login_password: "{{ rootpw }}"
- password: abc
- name: user1
- host: localhost
- - name: With_items does show that its null but still doesnt work
- mysql_user:
- login_user: root
- login_password: "{{ rootpw }}"
- password: "{{ item.pw }}"
- name: user1
- priv: "*.*:ALL"
- host: localhost
- with_items: nullindirectarr
- - name: is pw still the same? Green yes, orange no (is orange)
- mysql_user:
- login_user: root
- login_password: "{{ rootpw }}"
- password: abc
- name: user1
- host: localhost
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement