---
- name: Global Credentials
  hosts: dnac_servers
  vars_files:
    - credentials.yml
  gather_facts: false
  tasks:
    - name: Create CLI Credential
      cisco.dnac.cli_credential:
        dnac_host: "{{ dnac_host }}"
        dnac_username: "{{ dnac_username }}"
        dnac_password: "{{ dnac_password }}"
        dnac_verify: "{{ dnac_verify }}"
        dnac_port: "{{ dnac_port }}"
        dnac_version: "{{ dnac_version }}"
        dnac_debug: "{{ dnac_debug }}"
        state: present
        validate_response_schema: false
        enablePassword: C2sco456!
        username: Test2
        password: C2sco456!2
        description: Test2 Ansible

    - name: Create SNMPV3 Credential
      cisco.dnac.snmpv3_credential:
        dnac_host: "{{ dnac_host }}"
        dnac_username: "{{ dnac_username }}"
        dnac_password: "{{ dnac_password }}"
        dnac_verify: "{{ dnac_verify }}"
        dnac_port: "{{ dnac_port }}"
        dnac_version: "{{ dnac_version }}"
        dnac_debug: "{{ dnac_debug }}"
        state: present
        validate_response_schema: false
        username: user2
        snmpMode: NOAUTHNOPRIV
        description: user2 222
