diff --git a/geant/gap_ansible/plugins/ansible.cfg b/geant/gap_ansible/plugins/ansible.cfg new file mode 100644 index 0000000000000000000000000000000000000000..341647c0a905e7842f08617d9381f563fadcd853 --- /dev/null +++ b/geant/gap_ansible/plugins/ansible.cfg @@ -0,0 +1,6 @@ +[defaults] +library = ./modules +host_key_checking = False + +[netconf_connection] +ssh_config = False diff --git a/geant/gap_ansible/plugins/inventory.ini b/geant/gap_ansible/plugins/inventory.ini new file mode 100644 index 0000000000000000000000000000000000000000..34e78ba6562415a75a211510e6e6a0bf7796e6ee --- /dev/null +++ b/geant/gap_ansible/plugins/inventory.ini @@ -0,0 +1,2 @@ +[junos] +my-junos ansible_host=62.40.119.4 ansible_user=gap-test ansible_password=concept_gear_ESSENTIAL93 ansible_connection=netconf ansible_network_os=juniper.junos.junos diff --git a/geant/gap_ansible/plugins/modules/junos_config.py b/geant/gap_ansible/plugins/modules/junos_config.py index 0b48e45df4128528ecf1971a788319022096f751..b5d1d78380e8b78fe6dbd3032846eba24fd1ea51 100644 --- a/geant/gap_ansible/plugins/modules/junos_config.py +++ b/geant/gap_ansible/plugins/modules/junos_config.py @@ -1,5 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +ANSIBLE_METADATA = { + "metadata_version": "1.1", + "status": ["preview"], + "supported_by": "community", + "supported_transports": ["netconf"], +} # (c) 2017, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) diff --git a/geant/gap_ansible/plugins/test-junos-private.yml b/geant/gap_ansible/plugins/test-junos-private.yml new file mode 100644 index 0000000000000000000000000000000000000000..c6987085af5ff43630041e523677ec48ccb40bd4 --- /dev/null +++ b/geant/gap_ansible/plugins/test-junos-private.yml @@ -0,0 +1,16 @@ +- name: Test private-candidate junos_config + hosts: junos + gather_facts: no + collections: + - geant.gap_ansible # <-- your locally installed collection + + tasks: + - name: Open private candidate, push a change and commit + geant.gap_ansible.junos_config: # <-- module from geant.gap_ansible + lines: + - set system services ssh root-login allow + config_mode: private + register: result + + - debug: + var: result