Server IP : 85.214.239.14 / Your IP : 18.224.54.118 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/ansible_collections/cisco/ise/playbooks/ |
Upload File : |
--- - hosts: ise_servers gather_facts: false vars: ise_login: &ise_login ise_hostname: "{{ ise_hostname }}" ise_username: "{{ ise_username }}" ise_password: "{{ ise_password }}" ise_verify: "{{ ise_verify }}" ise_debug: "{{ ise_debug }}" tasks: # - name: '[Get Nbar Apps]' # cisco.ise.trustsec_nbar_app_info: # <<: *ise_login # page: 1 # size: 100 # register: nbar_app_all # - name: '[Print Nbar Apps]' # ansible.builtin.debug: # var: nbar_app_all - name: Get Nbar App filtered by name cisco.ise.trustsec_nbar_app_info: <<: *ise_login filter: name.EQ.hyperwave-isp register: nbar_app_filtered - name: Get Nbar App by id cisco.ise.trustsec_nbar_app_info: <<: *ise_login id: "{{ nbar_app_filtered.ise_responses[0].id }}" when: - nbar_app_filtered is defined - nbar_app_filtered.ise_responses is defined - nbar_app_filtered.ise_responses | length > 0 register: nbar_app_by_id - name: Print Nbar App by id ansible.builtin.debug: var: nbar_app_by_id - name: Create Nbar App duplicate cisco.ise.trustsec_nbar_app: <<: *ise_login state: present name: "{{ nbar_app_by_id.ise_response[0].name}}-2" description: "{{ nbar_app_by_id.ise_response[0].description|int + 1 }}" networkIdentities: - ports: "{{ nbar_app_by_id.ise_response[0].networkIdentities[0].ports|int +1 }}" protocol: "{{ nbar_app_by_id.ise_response[0].networkIdentities[0].protocol }}" - ports: "{{ nbar_app_by_id.ise_response[0].networkIdentities[1].ports|int +1 }}" protocol: "{{ nbar_app_by_id.ise_response[0].networkIdentities[1].protocol }}" when: - nbar_app_by_id is defined - nbar_app_by_id.ise_response is defined - nbar_app_by_id.ise_response | length == 1 register: nbar_app_manage - name: Print Create Nbar ansible.builtin.debug: var: nbar_app_manage - name: Update Nbar App duplicate cisco.ise.trustsec_nbar_app: <<: *ise_login state: present name: "{{ nbar_app_by_id.ise_response[0].name}}-2" description: "{{ nbar_app_by_id.ise_response[0].description|int + 1 }}" networkIdentities: - ports: "{{ nbar_app_by_id.ise_response[0].networkIdentities[0].ports|int +2 }}" protocol: "{{ nbar_app_by_id.ise_response[0].networkIdentities[0].protocol }}" - ports: "{{ nbar_app_by_id.ise_response[0].networkIdentities[1].ports|int +2 }}" protocol: "{{ nbar_app_by_id.ise_response[0].networkIdentities[1].protocol }}" when: - nbar_app_by_id is defined - nbar_app_by_id.ise_response is defined - nbar_app_by_id.ise_response | length == 1 register: nbar_app_manage - name: Print Update Nbar ansible.builtin.debug: var: nbar_app_manage - name: Delete Nbar App duplicate cisco.ise.trustsec_nbar_app: <<: *ise_login state: absent name: "{{ nbar_app_by_id.ise_response[0].name}}-2" description: "{{ nbar_app_by_id.ise_response[0].description|int + 1 }}" networkIdentities: - ports: "{{ nbar_app_by_id.ise_response[0].networkIdentities[0].ports|int +1 }}" protocol: "{{ nbar_app_by_id.ise_response[0].networkIdentities[0].protocol }}" - ports: "{{ nbar_app_by_id.ise_response[0].networkIdentities[1].ports|int +1 }}" protocol: "{{ nbar_app_by_id.ise_response[0].networkIdentities[1].protocol }}" when: - nbar_app_by_id is defined - nbar_app_by_id.ise_response is defined - nbar_app_by_id.ise_response | length == 1 register: nbar_app_manage - name: "Print Delete Nbar" ansible.builtin.debug: var: nbar_app_manage