match=line

* Simple line matching against the running config with respect to context
(parents).  If the line is in the config, then nothing will be done.  If
the line isn't in the config, it will be added

match=none

* Ignore the running config all together and push the config lines into the
device running config

match=strict

* Strict line matching, for instance an ACL.  Ensures the statements are
ordered as per the module definition

* Example

running-config:
permit 1.1.1.1
permit 2.2.2.2
permit 3.3.3.3
permit 4.4.4.4
permit 5.5.5.5

module - passes
permit 1.1.1.1
permit 2.2.2.2
permit 3.3.3.3
permit 4.4.4.4

module - fails (although match=line would pass)
permit 10 1.1.1.1
permit 20 4.4.4.4
permit 30 2.2.2.2
permit 40 3.3.3.3

match=exact

* Strict line matching with absolute entries, again most common with ACL

* Example

running-config:
permit 1.1.1.1
permit 2.2.2.2
permit 3.3.3.3
permit 4.4.4.4
permit 5.5.5.5

module - passes
permit 1.1.1.1
permit 2.2.2.2
permit 3.3.3.3
permit 4.4.4.4
permit 5.5.5.5

module - fails (config has 5 total items, module definition expects only 4)
permit 10 1.1.1.1
permit 20 2.2.2.2
permit 30 2.2.2.2
permit 40 4.4.4.4

HTH



On Tue, Feb 14, 2017 at 5:01 PM, Adam Wilkins <[email protected]> wrote:

> I'm a little confused on the various match clauses in the 'ios_config'
> module. I understand IOS very well. I'm trying to find use cases for the
> different options here.
>
> Does anyone have any example of when each would be used?
>
>
> Here are the options:
>
>
>    - line
>       - strict
>       - exact
>       - none
>
>
>
> Here is the definition:
>
> Instructs the module on the way to perform the matching of the set of
> commands against the current device config. If match is set to *line*,
> commands are matched line by line. If match is set to *strict*, command
> lines are matched with respect to position. If match is set to *exact*,
> command lines must be an equal match. Finally, if match is set to *none*,
> the module will not attempt to compare the source configuration with the
> running configuration on the remote device.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ansible-project/1035eb9c-3e0f-4009-bd9d-cb74acc6c915%40googlegroups.
> com
> <https://groups.google.com/d/msgid/ansible-project/1035eb9c-3e0f-4009-bd9d-cb74acc6c915%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAEkdrMjTfFWBLAT6ZzayS07GcGmC05i%3D08-4pzPJXk5anGLv0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to