Coder Social home page Coder Social logo

Comments (7)

mikewiebe avatar mikewiebe commented on May 29, 2024 1

@micruzz82 Thanks for opening the issue. We are working on a fix. Thanks!

from ansible-dcnm.

micruzz82 avatar micruzz82 commented on May 29, 2024 1

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.

micruzz82 avatar micruzz82 commented on May 29, 2024

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.

mikewiebe avatar mikewiebe commented on May 29, 2024

@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.

mikewiebe avatar mikewiebe commented on May 29, 2024

@micruzz82 I also just opened the following PR to fix the doc issues

#59

from ansible-dcnm.

mikewiebe avatar mikewiebe commented on May 29, 2024

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.

micruzz82 avatar micruzz82 commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.