HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //usr/lib/python3.9/site-packages/ansible_collections/cisco/dnac/playbooks/application_sets.yml
---
- hosts: dnac_servers
  vars_files:
    - credentials.yml
  gather_facts: false
  tasks:
    - name: Create an application set
      cisco.dnac.application_sets:
        dnac_host: "{{ dnac_host }}"
        dnac_username: "{{ dnac_username }}"
        dnac_password: "{{ dnac_password }}"
        dnac_verify: "{{ dnac_verify }}"
        dnac_debug: "{{ dnac_debug }}"
        state: present
        payload:
          - name: AppSet1
      register: application_set_result

    - name: Get task info
      cisco.dnac.task_info:
        dnac_host: "{{ dnac_host }}"
        dnac_username: "{{ dnac_username }}"
        dnac_password: "{{ dnac_password }}"
        dnac_verify: "{{ dnac_verify }}"
        taskId: "{{ application_set_result.dnac_response.response.taskId }}"
      when:
        - application_set_result.dnac_response is defined
        - application_set_result.dnac_response.response is defined
        - application_set_result.dnac_response.response.taskId is defined
      register: task_result

    - name: Show new application_set
      ansible.builtin.debug:
        msg: "{{ application_set_result }}"
      when:
        - application_set_result is defined

    - name: Show retrieved task
      ansible.builtin.debug:
        msg: "{{ task_result.dnac_response.response }}"
      when:
        - task_result is defined
        - task_result.dnac_response is defined