Try PubSub+

Configuring Solace with Ansible : ERROR! couldn't resolve module/action 'solace_client_username'

QaisQais Member Posts: 9
edited October 2020 in PubSub+ Event Broker #1

Hi there,
I am trying to use Ansible to configure solace (create client usernames and acl-profles) however i get an Error (at least one right now). The error says:

ERROR! couldn't resolve module/action 'solace_client_username'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/Users/quais/reddi_infrastructure/ansible/solace-cloud/ansible-code/playbook.create-sc-client.yml': line 10, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
  - name: Remove Client
    ^ here


  
    
      ERROR ...
    
  


Apparently it cannot resolve module action 'solace_client_username'. I have to admit that the playbook.create-sc.client.yml was not already in the repo (written by @swenhelge I guess) (below), I had to create it.
I used this Repo and added the playbook.create-sc-client.yml which is also below https://github.com/solace-iot-team/ansible-solace/tree/master/working-with-solace-cloud

- name: Playbook to add a client named 'nemo-ansible'
  hosts: localhost
  vars:
    msg_vpn: reddi
    client_profile: default
    client: nemo-ansible
    client_password: ansible123
  tasks:

  - name: Remove Client
    solace_client_username:
      name: "{{ client }}"
      msg_vpn: "{{ msg_vpn }}"
      state: absent

  - name: Add Client
    solace_client_username:
      name: "{{ client }}"
      msg_vpn: "{{ msg_vpn }}"
      settings:
        clientProfileName: "{{ client_profile }}"
        password: "{{ client_password }}"

  - name: Update Client password
    solace_client_username:
      name: "{{ client }}"
      msg_vpn: "{{ msg_vpn }}"
      settings:
        password: "{{ client_password }}_new" # not in response so always changed

Comments

Sign In or Register to comment.