Hi,
Using Tower 2.1 I have a playbook which creates a stack including a Cloud DB instance, user and DB.
This works fine, but on running the playbook again, it fails with:
msg: A user with the name "xxxxxxxxxx" already exists.
(The username has special characters if that's any help).
I've pasted the YAML for creating the DB and user below - am I missing something obvious or is this module not idempotent?
Best regards,
David
- name: Create cloud DB server
rax_cdb:
credentials: ~/.rax.creds
region: LON
name: "{{ db_server }}"
flavor: 1
volume: 2
wait: yes
state: present
register: rax_db_server
- name: Create cloud DB
rax_cdb_database:
credentials: ~/.rax.creds
region: LON
name: "{{ db_name }}"
state: present
register: rax_db_database
- name: Create cloud DB user
rax_cdb_user:
credentials: ~/.rax.creds
region: LON
db_username: "{{ db_user }}"
db_password: "{{ db_password }}"
databases:
state: present
register: rax_db_user