Comments (7)
@micruzz82 Thanks for opening the issue. We are working on a fix. Thanks!
from ansible-dcnm.
thanks for the quick turn around and clarification @mikewiebe. I did indeed cp ps from the docs to run the ansible playbook. I'll test this out later today and if all is good will report back.
from ansible-dcnm.
It would be good if you set the global default to false rather than true. This way a user is explicitly stating they want to push the config from the code.
from ansible-dcnm.
@micruzz82 I was able to figure out what is happening. You probably cut and pasted your first dcnm_policy
task from our example documentation but there is a problem with the indentation in the docs.
The deploy:
flag and state:
flags need to be indented at the same level as the config:
parameter.
For example, the following is valid:
- name: Create policy
cisco.dcnm.dcnm_policy:
fabric: "{{ fabric_name }}"
state: merged
deploy: false
config:
- name: wiebe55 # This must be a valid template name
create_additional_policy: false # Do not create a policy if it already exists
priority: 101
- switch:
- ip: "{{ leaf1 }}"
But the following is not valid and the deploy
and merge
flags will be ignored since they are children of config:
in this context. This is a bug that we need to fix but for now, just make sure the indentation for the deploy:
and state:
parameters are at the same indentation level as config:
- name: Create policy
cisco.dcnm.dcnm_policy:
fabric: "{{ fabric_name }}"
config:
- name: wiebe55 # This must be a valid template name
create_additional_policy: false # Do not create a policy if it already exists
priority: 101
- switch:
- ip: "{{ leaf1 }}"
deploy: false
state: merged
We will fix the documentation and generate a user error if the deploy:
and state:
parameters are added under config.
from ansible-dcnm.
@micruzz82 I also just opened the following PR to fix the doc issues
from ansible-dcnm.
It would be good if you set the global default to false rather than true. This way a user is explicitly stating they want to push the config from the code.
We are trying to keep this module consistent with our other modules that have a deploy
option so we don't plan to change the default value. We wanted to use a default that completes the workflow (create object and deploy) but still give users the option to stop short of deploy by setting the value to false
.
from ansible-dcnm.
no thats perfectly fine @mikewiebe I've also tested the code and it works great now after fixing the indent. I will test out further the policy module as I also had a few other issues during running the ansible playbook so will raise a separate issue.
For this one, I know you've marked this as a bug so if you think you will track this internally, please feel free to close down this issue.
Thanks again and great effort on getting the ansible modules working. No doubt it will simplify deployment much faster than manual configuration on the web gui.
from ansible-dcnm.
Related Issues (20)
- Configure cisco.dcnm.dcnm_interface with vpc mode HOT 2
- dcnm_vrf should attach the vrf to switches when deploy is false HOT 1
- dcnm_network should attach the network to switches without deploying when deploy=false HOT 1
- module error when deploy second vrf using state=overridden HOT 1
- dcnm_link error when trying to modify the auto-discovered link HOT 3
- support `save` and `deploy` option on dcnm_inventory module
- can't create a vrf in NDFC HOT 2
- NDFC Support for login Domain HOT 1
- task failed when re-run with same configuration HOT 1
- support secondary_ip of loopback interface
- support `int_fabric_loopback_11_1` type of interface
- support two new types of link template `ext_vxlan_mpls_overlay_setup` and `ext_vxlan_mpls_underlay_setup`
- Please DON'T use version 9.50.60 HOT 1
- support MPLS extension when attach the vrf to the border
- Support attach network to TOR switches and interfaces
- dcnm_image_upload module
- dcnm_image_policy HOT 1
- dcnm_image_upgrade HOT 1
- dcnm_maintenance
- dcnm_switch_bootflash
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-dcnm.