|
| 1 | +.. _cisco.dcnm.dcnm_maintenance_mode_module: |
| 2 | + |
| 3 | + |
| 4 | +******************************** |
| 5 | +cisco.dcnm.dcnm_maintenance_mode |
| 6 | +******************************** |
| 7 | + |
| 8 | +**Manage Maintenance Mode Configuration of NX-OS Switches.** |
| 9 | + |
| 10 | + |
| 11 | +Version added: 3.5.0 |
| 12 | + |
| 13 | +.. contents:: |
| 14 | + :local: |
| 15 | + :depth: 1 |
| 16 | + |
| 17 | + |
| 18 | +Synopsis |
| 19 | +-------- |
| 20 | +- Enable Maintenance or Normal Mode. |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +Parameters |
| 26 | +---------- |
| 27 | + |
| 28 | +.. raw:: html |
| 29 | + |
| 30 | + <table border=0 cellpadding=0 class="documentation-table"> |
| 31 | + <tr> |
| 32 | + <th colspan="3">Parameter</th> |
| 33 | + <th>Choices/<font color="blue">Defaults</font></th> |
| 34 | + <th width="100%">Comments</th> |
| 35 | + </tr> |
| 36 | + <tr> |
| 37 | + <td colspan="3"> |
| 38 | + <div class="ansibleOptionAnchor" id="parameter-"></div> |
| 39 | + <b>config</b> |
| 40 | + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 41 | + <div style="font-size: small"> |
| 42 | + <span style="color: purple">dictionary</span> |
| 43 | + / <span style="color: red">required</span> |
| 44 | + </div> |
| 45 | + </td> |
| 46 | + <td> |
| 47 | + </td> |
| 48 | + <td> |
| 49 | + <div>A dictionary containing the maintenance mode configuration.</div> |
| 50 | + </td> |
| 51 | + </tr> |
| 52 | + <tr> |
| 53 | + <td class="elbow-placeholder"></td> |
| 54 | + <td colspan="2"> |
| 55 | + <div class="ansibleOptionAnchor" id="parameter-"></div> |
| 56 | + <b>deploy</b> |
| 57 | + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 58 | + <div style="font-size: small"> |
| 59 | + <span style="color: purple">boolean</span> |
| 60 | + </div> |
| 61 | + </td> |
| 62 | + <td> |
| 63 | + <ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 64 | + <li><div style="color: blue"><b>no</b> ←</div></li> |
| 65 | + <li>yes</li> |
| 66 | + </ul> |
| 67 | + </td> |
| 68 | + <td> |
| 69 | + <div>Whether to deploy the switch configurations.</div> |
| 70 | + </td> |
| 71 | + </tr> |
| 72 | + <tr> |
| 73 | + <td class="elbow-placeholder"></td> |
| 74 | + <td colspan="2"> |
| 75 | + <div class="ansibleOptionAnchor" id="parameter-"></div> |
| 76 | + <b>mode</b> |
| 77 | + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 78 | + <div style="font-size: small"> |
| 79 | + <span style="color: purple">boolean</span> |
| 80 | + </div> |
| 81 | + </td> |
| 82 | + <td> |
| 83 | + <ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 84 | + <li>no</li> |
| 85 | + <li>yes</li> |
| 86 | + </ul> |
| 87 | + <b>Default:</b><br/><div style="color: blue">"normal"</div> |
| 88 | + </td> |
| 89 | + <td> |
| 90 | + <div>Enable maintenance or normal mode on all switches.</div> |
| 91 | + </td> |
| 92 | + </tr> |
| 93 | + <tr> |
| 94 | + <td class="elbow-placeholder"></td> |
| 95 | + <td colspan="2"> |
| 96 | + <div class="ansibleOptionAnchor" id="parameter-"></div> |
| 97 | + <b>switches</b> |
| 98 | + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 99 | + <div style="font-size: small"> |
| 100 | + <span style="color: purple">list</span> |
| 101 | + / <span style="color: purple">elements=dictionary</span> |
| 102 | + / <span style="color: red">required</span> |
| 103 | + </div> |
| 104 | + </td> |
| 105 | + <td> |
| 106 | + </td> |
| 107 | + <td> |
| 108 | + <div>A list of target switches.</div> |
| 109 | + <div>Per-switch options override the global options.</div> |
| 110 | + </td> |
| 111 | + </tr> |
| 112 | + <tr> |
| 113 | + <td class="elbow-placeholder"></td> |
| 114 | + <td class="elbow-placeholder"></td> |
| 115 | + <td colspan="1"> |
| 116 | + <div class="ansibleOptionAnchor" id="parameter-"></div> |
| 117 | + <b>deploy</b> |
| 118 | + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 119 | + <div style="font-size: small"> |
| 120 | + <span style="color: purple">boolean</span> |
| 121 | + </div> |
| 122 | + </td> |
| 123 | + <td> |
| 124 | + <ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 125 | + <li><div style="color: blue"><b>no</b> ←</div></li> |
| 126 | + <li>yes</li> |
| 127 | + </ul> |
| 128 | + </td> |
| 129 | + <td> |
| 130 | + <div>Whether to deploy the switch configuration.</div> |
| 131 | + </td> |
| 132 | + </tr> |
| 133 | + <tr> |
| 134 | + <td class="elbow-placeholder"></td> |
| 135 | + <td class="elbow-placeholder"></td> |
| 136 | + <td colspan="1"> |
| 137 | + <div class="ansibleOptionAnchor" id="parameter-"></div> |
| 138 | + <b>ip_address</b> |
| 139 | + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 140 | + <div style="font-size: small"> |
| 141 | + <span style="color: purple">string</span> |
| 142 | + / <span style="color: red">required</span> |
| 143 | + </div> |
| 144 | + </td> |
| 145 | + <td> |
| 146 | + </td> |
| 147 | + <td> |
| 148 | + <div>The IP address of the switch.</div> |
| 149 | + </td> |
| 150 | + </tr> |
| 151 | + <tr> |
| 152 | + <td class="elbow-placeholder"></td> |
| 153 | + <td class="elbow-placeholder"></td> |
| 154 | + <td colspan="1"> |
| 155 | + <div class="ansibleOptionAnchor" id="parameter-"></div> |
| 156 | + <b>mode</b> |
| 157 | + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 158 | + <div style="font-size: small"> |
| 159 | + <span style="color: purple">string</span> |
| 160 | + </div> |
| 161 | + </td> |
| 162 | + <td> |
| 163 | + <ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 164 | + <li>maintenance</li> |
| 165 | + <li><div style="color: blue"><b>normal</b> ←</div></li> |
| 166 | + </ul> |
| 167 | + </td> |
| 168 | + <td> |
| 169 | + <div>Enable maintenance or normal mode for the switch.</div> |
| 170 | + </td> |
| 171 | + </tr> |
| 172 | + <tr> |
| 173 | + <td class="elbow-placeholder"></td> |
| 174 | + <td class="elbow-placeholder"></td> |
| 175 | + <td colspan="1"> |
| 176 | + <div class="ansibleOptionAnchor" id="parameter-"></div> |
| 177 | + <b>wait_for_mode_change</b> |
| 178 | + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 179 | + <div style="font-size: small"> |
| 180 | + <span style="color: purple">boolean</span> |
| 181 | + </div> |
| 182 | + </td> |
| 183 | + <td> |
| 184 | + <ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 185 | + <li><div style="color: blue"><b>no</b> ←</div></li> |
| 186 | + <li>yes</li> |
| 187 | + </ul> |
| 188 | + </td> |
| 189 | + <td> |
| 190 | + <div>If deploy is enabled, whether to wait for NDFC to push the change to the switch. Ignored if deploy is not enabled.</div> |
| 191 | + </td> |
| 192 | + </tr> |
| 193 | + |
| 194 | + <tr> |
| 195 | + <td class="elbow-placeholder"></td> |
| 196 | + <td colspan="2"> |
| 197 | + <div class="ansibleOptionAnchor" id="parameter-"></div> |
| 198 | + <b>wait_for_mode_change</b> |
| 199 | + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 200 | + <div style="font-size: small"> |
| 201 | + <span style="color: purple">boolean</span> |
| 202 | + </div> |
| 203 | + </td> |
| 204 | + <td> |
| 205 | + <ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 206 | + <li><div style="color: blue"><b>no</b> ←</div></li> |
| 207 | + <li>yes</li> |
| 208 | + </ul> |
| 209 | + </td> |
| 210 | + <td> |
| 211 | + <div>If deploy is enabled, whether to wait for NDFC to push the change to the switch. Ignored if deploy is not enabled.</div> |
| 212 | + </td> |
| 213 | + </tr> |
| 214 | + |
| 215 | + <tr> |
| 216 | + <td colspan="3"> |
| 217 | + <div class="ansibleOptionAnchor" id="parameter-"></div> |
| 218 | + <b>state</b> |
| 219 | + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 220 | + <div style="font-size: small"> |
| 221 | + <span style="color: purple">string</span> |
| 222 | + </div> |
| 223 | + </td> |
| 224 | + <td> |
| 225 | + <ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 226 | + <li><div style="color: blue"><b>merged</b> ←</div></li> |
| 227 | + <li>query</li> |
| 228 | + </ul> |
| 229 | + </td> |
| 230 | + <td> |
| 231 | + <div>The state of the feature or object after module completion</div> |
| 232 | + </td> |
| 233 | + </tr> |
| 234 | + </table> |
| 235 | + <br/> |
| 236 | + |
| 237 | + |
| 238 | + |
| 239 | + |
| 240 | +Examples |
| 241 | +-------- |
| 242 | + |
| 243 | +.. code-block:: yaml |
| 244 | +
|
| 245 | + # Enable maintenance mode on all switches. |
| 246 | + # Do not deploy the configuration on any switch. |
| 247 | +
|
| 248 | + - name: Configure switch mode |
| 249 | + cisco.dcnm.dcnm_maintenance_mode: |
| 250 | + state: merged |
| 251 | + config: |
| 252 | + deploy: true |
| 253 | + wait_for_mode_change: true |
| 254 | + mode: maintenance |
| 255 | + switches: |
| 256 | + - ip_address: 192.168.1.2 |
| 257 | + - ip_address: 192.160.1.3 |
| 258 | + - ip_address: 192.160.1.4 |
| 259 | + register: result |
| 260 | + - debug: |
| 261 | + var: result |
| 262 | +
|
| 263 | + # Enable maintenance mode on two switches. |
| 264 | + # Enable normal mode on one switch. |
| 265 | + # Deploy the configuration on one switch. |
| 266 | +
|
| 267 | + - name: Configure switch mode |
| 268 | + cisco.dcnm.dcnm_maintenance_mode: |
| 269 | + state: merged |
| 270 | + config: |
| 271 | + deploy: false |
| 272 | + mode: maintenance |
| 273 | + switches: |
| 274 | + - ip_address: 192.168.1.2 |
| 275 | + mode: normal |
| 276 | + - ip_address: 192.160.1.3 |
| 277 | + deploy: true |
| 278 | + wait_for_mode_change: true |
| 279 | + - ip_address: 192.160.1.4 |
| 280 | + register: result |
| 281 | + - debug: |
| 282 | + var: result |
| 283 | +
|
| 284 | +
|
| 285 | +
|
| 286 | +
|
| 287 | +Status |
| 288 | +------ |
| 289 | + |
| 290 | + |
| 291 | +Authors |
| 292 | +~~~~~~~ |
| 293 | + |
| 294 | +- Allen Robel (@quantumonion) |
0 commit comments