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

Ansible: Fix connection plugins and add support for NETCONF #72370

Merged
merged 3 commits into from Nov 20, 2019

Conversation

mweinelt
Copy link
Member

Motivation for this change
Things done
  1. Patches Ansible to use the unwrapped version of ansible-connection, as it executes it through a python interpreter, which currently results in a SyntaxError. Fixes Ansible: Task runs into syntax error when using ansible_connection=netconf #71342

  2. Includes ncclient to add support for netconf connections to configure network hardware.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
    • Before: /nix/store/8hz5c81n1cfgwczn267y1prdizhw55q8-python3.7-ansible-2.8.4 220.9M
    • After: /nix/store/azxh8l7bvkga12yk10zm0qscc5ai6cah-python3.7-ansible-2.8.4 228.4M
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @joamaki @costrouc

@mweinelt mweinelt force-pushed the pr/ansible/netconf branch 2 times, most recently from 8058cfc to 8dadc40 Compare October 31, 2019 15:05
@mweinelt
Copy link
Member Author

Ansible tries to execute the ansible-connection script as a python
script from within it's task executor. This does not work when it is
encapsulated in a shell script. Therefore remove the call to the python
interpreter and use the wrapped version directly.

Fixes NixOS#71342
- boto was dropped from propagatedBuildInputs in 4af94d0f
- lib/ansible/constants.py does not have "/usr" anywhere in v2.4..v2.9
@mweinelt mweinelt changed the title Ansible: Fix connection plugins and add support for netconf Ansible: Fix connection plugins and add support for NETCONF Oct 31, 2019
@FRidh FRidh merged commit 2bb4191 into NixOS:master Nov 20, 2019
@mweinelt mweinelt deleted the pr/ansible/netconf branch November 20, 2019 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ansible: Task runs into syntax error when using ansible_connection=netconf
2 participants