Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] feature proposal: confirm parameter in junos modules #53315

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
2 participants
@eleksis
Copy link

eleksis commented Mar 5, 2019

SUMMARY

Currently each junos module commits changes right away. If playbook executes multiple junos modules in a row, we don't have an option to revert all changes at the end of playbook if we are left with undesired configuration.

Since junos_config module already has 'confirm' feature, would be nice to add it to all other modules. We are using overridden modules with this feature already. I just want to know if there is any interest to make pull request.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

junos_*.py

ADDITIONAL INFORMATION

Playbook example:

  • name: Configure Juniper switch
    hosts: junos
    tasks:

    • name: Create vlan configuration
      junos_vlan:
      aggregate: "{{ vlans }}"
      confirm: 3

    • name: Configure switchport parameteres of L2 interfaces
      junos_l2_interface:
      aggregate: "{{ l2_ifaces }}"
      confirm: 3

    • name: Configure general settings of L2 interfaces
      junos_interface:
      aggregate: "{{ ifaces }}"
      confirm: 3

    • name: Confirm last commit
      junos_config:
      confirm_commit: yes
      changed_when: false

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 5, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 5, 2019

@eleksis, just so you are aware we have a dedicated Working Group for network.
You can find other people interested in this in #ansible-network on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 5, 2019

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/network/junos/junos_interface.py:186:8: W291 trailing whitespace

The test ansible-test sanity --test validate-modules [explain] failed with 2 errors:

lib/ansible/modules/network/junos/junos_interface.py:0:0: E309 version_added for new option (confirm) should be '2.8'. Currently StrictVersion ('0.0')
lib/ansible/modules/network/junos/junos_interface.py:0:0: E322 Argument 'comment' is listed in the argument_spec, but not documented in the module documentation

click here for bot help

@ansibot ansibot added the ci_verified label Mar 5, 2019

@ansibot ansibot added the stale_ci label Mar 13, 2019

@rcarrillocruz rcarrillocruz requested a review from ganeshrn Mar 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.