Closed dsx1123 closed 3 weeks ago
Playbooks as implemented on branch dcnm_bootflash. Work in progress PR: https://github.com/CiscoDevNet/ansible-dcnm/pull/311
---
# Example deleted state.
# 1. On switch 192.168.1.1
# Delete all text files from all flash devices on active supervisor.
# 2. On switch 192.168.1.2
# Delete foo.txt from bootflash on active supervisor.
# 3. On switch 192.168.1.3
# Delete all files, whose name implies creation during the month of
# July 2024, from bootflash on active supervisor.
# NOTES:
# - 192.168.1.1 uses the global targets specification.
# - 192.168.1.2 and 192.168.1.3 override the global targets
# specification with their own local targets specification.
- name: Example deleted state
cisco.dcnm.dcnm_bootflash:
state: deleted
config:
targets:
- filepath: "*:/*.txt"
supervisor: active
switches:
- ip_address: 192.168.1.1
- ip_address: 192.168.1.2
targets:
- filepath: bootflash:/foo.txt
supervisor: active
- ip_address: 192.168.1.3
targets:
- filepath: bootflash:/202407??.*
supervisor: active
# Example query state.
# 1. On switch 192.168.1.1
# List all text files from all flash devices on active supervisor.
# 2. On switch 192.168.1.2
# List foo.txt from bootflash on active supervisor.
# 3. On switch 192.168.1.3
# List all files, whose name implies creation during the month of
# July 2024, from bootflash on active supervisor.
# NOTES:
# - 192.168.1.1 uses the global targets specification.
# - 192.168.1.2 and 192.168.1.3 override the global targets
# specification with their own local targets specification.
# - If files do not exist, the module returns an empty list.
- name: Example query state
cisco.dcnm.dcnm_bootflash:
state: query
config:
targets:
- filepath: "*:/*.txt"
supervisor: active
switches:
- ip_address: 192.168.1.1
- ip_address: 192.168.1.2
targets:
- filepath: bootflash:/foo.txt
supervisor: active
- ip_address: 192.168.1.3
targets:
- filepath: bootflash:/202407??.*
supervisor: active
Community Note
Description
new module to manage bootflash of switches
New or Affected modules(s):
DCNM version
Potential ansible task config
References
Additional context Add any other context or screenshots about the feature request here.