---
- name: Creating the Ceilometer project, user, and role
  kolla_toolbox:
    module_name: "kolla_keystone_user"
    module_args:
      project: "service"
      user: "{{ ceilometer_keystone_user }}"
      password: "{{ ceilometer_keystone_password }}"
      role: "admin"
      region_name: "{{ openstack_region_name }}"
      auth: "{{ openstack_ceilometer_auth }}"
      endpoint_type: "{{ openstack_interface }}"
  run_once: True

- name: Associate the ResellerAdmin role and ceilometer user
  kolla_toolbox:
    module_name: "os_user_role"
    module_args:
      project: "service"
      user: "{{ ceilometer_keystone_user }}"
      role: "ResellerAdmin"
      region_name: "{{ openstack_region_name }}"
      auth: "{{ openstack_ceilometer_auth }}"
      endpoint_type: "{{ openstack_interface }}"
  when: enable_swift | bool
  run_once: True
