summaryrefslogtreecommitdiffstats
path: root/ansible_collections/cisco/dnac/playbooks/applications.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:04:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:04:41 +0000
commit975f66f2eebe9dadba04f275774d4ab83f74cf25 (patch)
tree89bd26a93aaae6a25749145b7e4bca4a1e75b2be /ansible_collections/cisco/dnac/playbooks/applications.yml
parentInitial commit. (diff)
downloadansible-975f66f2eebe9dadba04f275774d4ab83f74cf25.tar.xz
ansible-975f66f2eebe9dadba04f275774d4ab83f74cf25.zip
Adding upstream version 7.7.0+dfsg.upstream/7.7.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/cisco/dnac/playbooks/applications.yml')
-rw-r--r--ansible_collections/cisco/dnac/playbooks/applications.yml72
1 files changed, 72 insertions, 0 deletions
diff --git a/ansible_collections/cisco/dnac/playbooks/applications.yml b/ansible_collections/cisco/dnac/playbooks/applications.yml
new file mode 100644
index 000000000..a8d752338
--- /dev/null
+++ b/ansible_collections/cisco/dnac/playbooks/applications.yml
@@ -0,0 +1,72 @@
+---
+- hosts: dnac_servers
+ vars_files:
+ - credentials.yml
+ gather_facts: false
+ tasks:
+ - name: Create an application
+ cisco.dnac.applications:
+ dnac_host: "{{ dnac_host }}"
+ dnac_username: "{{ dnac_username }}"
+ dnac_password: "{{ dnac_password }}"
+ dnac_verify: "{{ dnac_verify }}"
+ dnac_debug: "{{ dnac_debug }}"
+ state: present
+ payload:
+ - name: itunes-video
+ networkApplications:
+ - id: d4658954-ef8e-4eb9-a663-d53e3f4de325
+ appProtocol: tcp
+ applicationSubType: NONE
+ applicationType: DEFAULT
+ categoryId: edc1f53c-d89d-4e8d-a23b-6148e3857504
+ displayName: "12608"
+ engineId: "13"
+ helpString: iTunes video streaming
+ longDescription: >-
+ iTunes is a media player and media library application developed by Apple Inc. It is used to play, download, and organize digital
+ audio and video on personal computers running the OS X and Microsoft Windows operating systems. Through the iTunes Store, users
+ can purchase and
+ download music, music videos, television shows, audiobooks, podcasts, movies, etc. on their MAC/ Win PC/ iDevices running iTunes.
+ iTunes-video refers to all video streaming media services generated by iTunes such as: play movies, TV shows, videocasts, video, etc.
+ name: itunes-video
+ popularity: "10"
+ rank: "65535"
+ selectorId: "572"
+ trafficClass: MULTIMEDIA_STREAMING
+ networkIdentity:
+ - id: 4babbfcf-c5b7-4105-8954-1ee3a6097753
+ displayName: "1461196"
+ lowerPort: "0"
+ ports: "80"
+ protocol: TCP
+ upperPort: "0"
+ applicationSet:
+ idRef: d31b81a3-a599-4d0c-bb6d-42bbdd0e7889
+ register: application_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_result.dnac_response.response.taskId }}"
+ when:
+ - application_result.dnac_response is defined
+ - application_result.dnac_response.response is defined
+ - application_result.dnac_response.response.taskId is defined
+ register: task_result
+
+ - name: Show new application_set
+ ansible.builtin.debug:
+ msg: "{{ application_result }}"
+ when:
+ - application_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