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
        cdb_id: "{{rax_db_server.cdb.id}}"
        name: "{{ db_name }}"
        state: present
      register: rax_db_database

    - name: Create cloud DB user
      rax_cdb_user:
        credentials: ~/.rax.creds
        region: LON
        cdb_id: "{{rax_db_server.cdb.id}}"
        db_username: "{{ db_user }}"
        db_password: "{{ db_password }}"
        databases:
          - "{{rax_db_database.database.name}}"
        state: present
      register: rax_db_user

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a860e219-6775-43e6-9b85-b95a0e8e20c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to