summaryrefslogtreecommitdiffstats
path: root/ansible_collections/cisco/meraki/playbooks/mv_playbook.yml
blob: 78d8c07ba258b18997d6b526be5023170c21b740 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---

- hosts: localhost
  vars:
    serial_number: QBSD-8VXX-6QXX
    network_id: L_828099381482770866 # Site-2
  gather_facts: false
  tasks:

  - name: Update Camera name
    cisco.meraki.devices:
      serial: "{{ serial_number }}"
      name: My Camera

  - name: Update Camera video settings
    cisco.meraki.devices_camera_video_settings:
      serial: "{{ serial_number }}"
      externalRtspEnabled: true

  - name: Create a primary wireless profile
    cisco.meraki.networks_camera_wireless_profiles:
      networkId: "{{ network_id }}"
      name: wireless profile A
      ssid:
        name: cameras ssid
        authMode: psk
        encryptionMode: wpa
        psk: SuperSecretPreSharedKey
    register: primary_profile
  
  - name: Create a secondary wireless profile
    cisco.meraki.networks_camera_wireless_profiles:
      networkId: "{{ network_id }}"
      name: wireless profile B
      ssid:
        name: cameras ssid 2
        authMode: psk
        encryptionMode: wpa
        psk: SuperSecretPreSharedKey
    register: secondary_profile

  - name: Associate the camera with the wireless profile
    cisco.meraki.devices_camera_wireless_profiles:
      serial: "{{ serial_number }}"
      ids:
        primary: "{{ primary_profile['meraki_response']['id'] }}"
        secondary: "{{ secondary_profile['meraki_response']['id'] }}"

  - name: Update quality and retention settings
    cisco.meraki.devices_camera_quality_and_retention:
      serial: "{{ serial_number }}"
      audioRecordingEnabled: true
      motionBasedRetentionEnabled: true
      motionDetectorVersion: 2
      quality: High
      resolution: 1920x1080
      restrictedBandwidthModeEnabled: false

  # - name: Generate a snapshop
  #   cisco.meraki.devices_camera_generate_snapshot:
  #     serial: "{{ serial_number }}"
  #     fullframe: false
  #     timestamp: '2023-08-08T15:18:08Z'