diff --git a/geant/gap_ansible/playbooks/switch_base_config.yaml b/geant/gap_ansible/playbooks/switch_base_config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..fa8d5a0d8f0afe335557e421ed043150e76bfc09
--- /dev/null
+++ b/geant/gap_ansible/playbooks/switch_base_config.yaml
@@ -0,0 +1,6 @@
+- name: Manage base config playbook
+  hosts: localhost
+  gather_facts: false
+  roles:
+    - ../roles/switch
+
diff --git a/geant/gap_ansible/roles/switch/README.md b/geant/gap_ansible/roles/switch/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..225dd44b9fc5b3abff7e9c68ff9e91d505cdd5f0
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/README.md
@@ -0,0 +1,38 @@
+Role Name
+=========
+
+A brief description of the role goes here.
+
+Requirements
+------------
+
+Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
+
+Role Variables
+--------------
+
+A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
+
+Dependencies
+------------
+
+A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
+
+Example Playbook
+----------------
+
+Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
+
+    - hosts: servers
+      roles:
+         - { role: username.rolename, x: 42 }
+
+License
+-------
+
+BSD
+
+Author Information
+------------------
+
+An optional section for the role authors to include contact information, or a website (HTML is not allowed).
diff --git a/geant/gap_ansible/roles/switch/defaults/main.yml b/geant/gap_ansible/roles/switch/defaults/main.yml
new file mode 100644
index 0000000000000000000000000000000000000000..65c453ba5b93a0d671c6bde537ea1fb37a36b475
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+# defaults file for switch
diff --git a/geant/gap_ansible/roles/switch/handlers/main.yml b/geant/gap_ansible/roles/switch/handlers/main.yml
new file mode 100644
index 0000000000000000000000000000000000000000..073dff4f0c86d15207e7e589a6f58fe03e7ab827
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/handlers/main.yml
@@ -0,0 +1,2 @@
+---
+# handlers file for switch
diff --git a/geant/gap_ansible/roles/switch/meta/main.yml b/geant/gap_ansible/roles/switch/meta/main.yml
new file mode 100644
index 0000000000000000000000000000000000000000..ea68190c407b3056efc031b4312e10b5e5963469
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/meta/main.yml
@@ -0,0 +1,34 @@
+galaxy_info:
+  author: your name
+  description: your role description
+  company: your company (optional)
+
+  # If the issue tracker for your role is not on github, uncomment the
+  # next line and provide a value
+  # issue_tracker_url: http://example.com/issue/tracker
+
+  # Choose a valid license ID from https://spdx.org - some suggested licenses:
+  # - BSD-3-Clause (default)
+  # - MIT
+  # - GPL-2.0-or-later
+  # - GPL-3.0-only
+  # - Apache-2.0
+  # - CC-BY-4.0
+  license: license (GPL-2.0-or-later, MIT, etc)
+
+  min_ansible_version: 2.1
+
+  # If this a Container Enabled role, provide the minimum Ansible Container version.
+  # min_ansible_container_version:
+
+  galaxy_tags: []
+    # List tags for your role here, one per line. A tag is a keyword that describes
+    # and categorizes the role. Users find roles by searching for tags. Be sure to
+    # remove the '[]' above, if you add tags to this list.
+    #
+    # NOTE: A tag is limited to a single word comprised of alphanumeric characters.
+    #       Maximum 20 tags per role.
+
+dependencies: []
+  # List your role dependencies here, one per line. Be sure to remove the '[]' above,
+  # if you add dependencies to this list.
diff --git a/geant/gap_ansible/roles/switch/tasks/compile_base_config.yml b/geant/gap_ansible/roles/switch/tasks/compile_base_config.yml
new file mode 100644
index 0000000000000000000000000000000000000000..efee8974a398e531b6d637de35642e4391fdd367
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/tasks/compile_base_config.yml
@@ -0,0 +1,17 @@
+- name: Create a folder for all the things
+  ansible.builtin.file:
+    path: "/var/tmp/ansible_run_{{ opid }}"
+    state: directory
+    mode: '0755'
+  delegate_to: localhost
+
+
+- name: Print the template in "/var/tmp/ansible_run_{{ opid }}/base_config.conf"
+  ansible.builtin.template:
+    src: "{{ subscription.switch.vendor }}/base_config.j2"
+    dest: "/var/tmp/ansible_run_{{ opid }}/base_config.conf"
+    lstrip_blocks: true
+    trim_blocks: true
+    mode: '0755'
+  delegate_to: localhost
+
diff --git a/geant/gap_ansible/roles/switch/tasks/deploy_base_config.yml b/geant/gap_ansible/roles/switch/tasks/deploy_base_config.yml
new file mode 100644
index 0000000000000000000000000000000000000000..36786a21aa4703863118229a8986b8fbfa5ac9b0
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/tasks/deploy_base_config.yml
@@ -0,0 +1,25 @@
+- name: Deploy base_config on "{{ inventory_hostname }}" [CHECK ONLY][Juniper]
+  junipernetworks.junos.junos_config:
+    update: 'replace'
+    src: "/var/tmp/ansible_run_{{ opid }}/base_config.conf"
+    src_format: text
+    check_commit: true
+  diff: true
+  register: output
+  when: >
+    ( verb == "deploy" or verb == "verify" ) 
+    and
+    ( dry_run | ansible.builtin.bool )
+
+
+- name: Deploy base_config on "{{ inventory_hostname }}" [AND COMMIT][Juniper]
+  junipernetworks.junos.junos_config:
+    update: 'replace'
+    src: "/var/tmp/ansible_run_{{ opid }}/base_config.conf"
+    src_format: text
+    comment: "{{ commit_comment }}"
+  diff: true
+  when: >
+    verb == "deploy"
+    and
+    not ( dry_run | ansible.builtin.bool )
diff --git a/geant/gap_ansible/roles/switch/tasks/main.yml b/geant/gap_ansible/roles/switch/tasks/main.yml
new file mode 100644
index 0000000000000000000000000000000000000000..1a7be3ae09b2aefb0a3662caeae3f29fb1a09e61
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/tasks/main.yml
@@ -0,0 +1,48 @@
+---
+# tasks file for switch
+- name: Print the usage
+  ansible.builtin.debug:
+    msg:
+      - "Allowed verbs: 'verify' and 'deploy'. Use: -e 'verb=$verb'."
+  when: (verb is not defined) or (verb not in verbs)
+
+- name: Fail if arguments are missing
+  ansible.legacy.meta: end_play
+  when: (verb is not defined) or (verb not in verbs)
+
+- name: Set ansible_host to terminal server when router is offline
+  ansible.legacy.set_fact:
+    ansible_host: "{{ subscription.switch.switch_site.site_ts_address }}"
+    ansible_port: "{{ subscription.switch.switch_ts_port }}"
+  when:
+    ( subscription.switch.switch_access_via_ts | ansible.builtin.bool ) is true
+
+- name: Generate an ID for this run
+  ansible.legacy.set_fact:
+    opid: "{{ lookup('community.general.random_string', length=18, special=false) }}"
+    config_is_different: "False"
+
+- name: Import variables from 'all'
+  ansible.builtin.include_vars:
+    dir: /Users/simone.spinelli/WORK/SWITCH_REWORK/lab_gap_ansible_inventory/group_vars/all
+
+- name: Import variables from 'switches'
+  ansible.builtin.include_vars:
+    dir: /Users/simone.spinelli/WORK/SWITCH_REWORK/lab_gap_ansible_inventory/group_vars/switches
+
+- name: Print the ID
+  ansible.builtin.debug:
+    msg: "{{ opid }}"
+
+- name: Load info for switch model
+  ansible.builtin.set_fact:
+    ports: "{{ switch_model_map[subscription.switch.switch_model].ports }}"
+    client_ports_prefix: "{{ switch_model_map[subscription.switch.switch_model].client_ports_prefix }}"
+
+- name: Include always compiling phase
+  ansible.builtin.include_tasks: compile_base_config.yml
+  when: verb in verbs
+
+- name: Include deploy phase
+  ansible.builtin.include_tasks: deploy_base_config.yml
+  when: verb == "deploy"
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/base_config.j2 b/geant/gap_ansible/roles/switch/templates/juniper/base_config.j2
new file mode 100644
index 0000000000000000000000000000000000000000..dadf4930a68ab7f4c7a73601b6bd8af2fece0562
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/base_config.j2
@@ -0,0 +1,15 @@
+{% include 'system/system_global.j2' %}
+
+{% if verb == "deploy" %}
+{% include './interfaces.j2' %}
+{% endif %}
+
+{% include './protocols.j2' %}
+
+{% include './fw_options.j2' %}
+
+{% include './snmp.j2' %}
+
+{% include './chassis.j2' %}
+
+{% include './routing_options.j2' %}
\ No newline at end of file
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/chassis.j2 b/geant/gap_ansible/roles/switch/templates/juniper/chassis.j2
new file mode 100644
index 0000000000000000000000000000000000000000..8ac42ee38b04dacfd7ff4deb3097778c5823ee31
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/chassis.j2
@@ -0,0 +1,7 @@
+replace: chassis {
+    aggregated-devices {
+        ethernet {
+            device-count {{switch_aggregated_ethernet_count}};
+        }
+    }
+}
\ No newline at end of file
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/fw_options.j2 b/geant/gap_ansible/roles/switch/templates/juniper/fw_options.j2
new file mode 100644
index 0000000000000000000000000000000000000000..edb98257aa279f33bc2aa371497edda5596824b6
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/fw_options.j2
@@ -0,0 +1,5 @@
+replace: forwarding-options {
+    storm-control-profiles default {
+        all;
+    }
+}
\ No newline at end of file
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/interfaces.j2 b/geant/gap_ansible/roles/switch/templates/juniper/interfaces.j2
new file mode 100644
index 0000000000000000000000000000000000000000..f091cac35072c1716078e85a2191af6b21d5f60f
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/interfaces.j2
@@ -0,0 +1,8 @@
+{% for interface in range(ports|int) %}
+interfaces {
+replace: {{client_ports_prefix}}/{{interface}} {
+        description "PHY SPARE";
+        disable;
+    }
+}
+{% endfor %}
\ No newline at end of file
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/protocols.j2 b/geant/gap_ansible/roles/switch/templates/juniper/protocols.j2
new file mode 100644
index 0000000000000000000000000000000000000000..2c543a568dbb3c1b572fe0e17d796448176c162e
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/protocols.j2
@@ -0,0 +1,21 @@
+replace: protocols {
+    router-advertisement {
+        interface vme.0;
+        interface irb.0;
+    }
+    lldp {
+        interface all;
+    }
+    lldp-med {                          
+        interface all;
+    }
+    igmp-snooping {
+        vlan default;
+    }
+    rstp {
+        interface all;
+    }
+    layer2-control {
+       nonstop-bridging;
+   }
+}
\ No newline at end of file
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/routing_options.j2 b/geant/gap_ansible/roles/switch/templates/juniper/routing_options.j2
new file mode 100644
index 0000000000000000000000000000000000000000..4c240b3bf10c2d8a74a111e1fb3f057660e5e589
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/routing_options.j2
@@ -0,0 +1,3 @@
+merge: routing-options {
+    nonstop-routing;
+}
\ No newline at end of file
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/snmp.j2 b/geant/gap_ansible/roles/switch/templates/juniper/snmp.j2
new file mode 100644
index 0000000000000000000000000000000000000000..832498e33dec07c501f41e966c810f1d22b79bb8
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/snmp.j2
@@ -0,0 +1,58 @@
+replace: snmp {
+    location "{{ snmp_location }}";
+    contact "{{ snmp_contact }}";
+    {% if snmp_views is defined %}
+    {% for snmp_view in snmp_views() %}
+    view {{ snmp_view.name }} {
+      {% for oid_name, oid in snmp_view.oids.items() %}
+      oid {{ oid_name }} {% if oid.state is defined %}{{ oid.state }}{% endif %};
+      {% endfor %}
+    }
+    {% endfor %}
+    {% endif %}
+    {% for community in snmp_communities %}
+    community {{ community.name }} {
+        authorization {{ community.authorization }};
+    {% if community.clients is defined %}
+        clients {
+        {% for client in community.clients %}
+            {{ client.client }};
+        {% endfor %}
+        }
+    {% endif %}
+    {% if community.view is defined %}
+        view {{ community.view }};
+    {% endif %}
+  }
+    {% endfor %}
+    {% if snmp_trap_options is defined %}
+    trap-options {
+        {% for option, value in snmp_trap_options.items() %}
+        {{ option }} {{ value }};
+        {% endfor %}
+    }
+    {% endif %}
+
+    {% for trap_group in snmp_trap_groups %}
+    trap-group {{ trap_group.name }} {
+        {% if trap_group.version is defined %}
+        version {{trap_group.version}};
+        {% endif %}
+        {% if trap_group.categories is defined %}
+        categories {
+        {% for category in trap_group.categories %}
+            {{ category }};
+        {% endfor %}
+        }
+        {% endif %}
+        targets {
+        {% for target in trap_group.targets %}
+            {{ target.target }};
+        {% endfor %}
+        }
+    }
+    {% endfor %}
+    {% if snmp_routing_instance_access is defined %}
+    routing-instance-access;    
+    {% endif %}
+}
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/system/general.j2 b/geant/gap_ansible/roles/switch/templates/juniper/system/general.j2
new file mode 100644
index 0000000000000000000000000000000000000000..01274ee45e94a03512e9949488d65c82969540dd
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/system/general.j2
@@ -0,0 +1,32 @@
+{% set hostname_as_a_list= subscription.switch.switch_fqdn.split('.')%}
+{% set short_hostname= hostname_as_a_list[:3] | join('.')%}
+system {
+  replace: host-name {{ short_hostname }};
+  replace: authentication-order [ radius password ];
+  {% if system_root_pwd is defined %}
+  replace:  root-authentication {
+  encrypted-password {{ system_root_pwd }} ;
+  }
+  {% endif %}
+  auto-snapshot
+  {% if system_domain_name is defined %}
+  replace:  domain-name {{ system_domain_name }} ;
+  {% endif %}
+  {% if system_time_zone is defined %}
+  replace:  time-zone {{ system_time_zone }} ;
+  {% endif %}
+  dump-on-panic;
+  {% if system_time_zone is defined %}
+  replace:  location country-code {{ site_country_code }} ;
+  {% endif %}
+  {% if system_domain_search is defined %}
+  replace: domain-search [ {% for domain in system_domain_search %}{{ domain }} {% endfor %} ];
+  {% endif %}
+  {% if system_name_servers is defined %}
+  replace: name-server {
+  {% for name_server in system_name_servers %}
+    {{ name_server }};
+  {% endfor %}
+  {% endif %}
+  }
+}
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/system/login.j2 b/geant/gap_ansible/roles/switch/templates/juniper/system/login.j2
new file mode 100644
index 0000000000000000000000000000000000000000..abad8a934f6ee408d3b6e7b15e447079f68897a3
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/system/login.j2
@@ -0,0 +1,81 @@
+system {
+replace: login {
+     idle-timeout 15;
+{# classes #}
+    {% if system_login_classes is defined %}
+      {% for login_class in system_login_classes %}
+     class {{ login_class.name }} {
+      {% if login_class.idle_timeout is defined %}
+          idle-timeout {{ login_class.idle_timeout }};
+      {% endif %}
+      {% if login_class.login_alarms is defined and login_class.login_alarms is sameas true %}
+          login-alarms;
+      {% endif %}
+      {% if login_class.permissions is defined %}
+          permissions [{% for permission in login_class.permissions %} {{ permission }}{% endfor %} ];
+      {% endif %}
+      {% if login_class.allow_commands is defined %}
+          allow-commands "{{ login_class.allow_commands }}";
+      {% endif %}
+      {% if login_class.deny_commands is defined %}
+          deny-commands "{{ login_class.deny_commands }}";
+      {% endif %}
+      {% if login_class.allow_configuration_regexps is defined %}
+          allow-configuration-regexps [ {% for regex in login_class.allow_configuration_regexps %} "{{ regex }}"{% endfor %} ];
+      {% endif %}
+      {% if login_class.deny_configuration_regexps is defined %}
+          deny-configuration-regexps [ {% for regex in login_class.deny_configuration_regexps %} "{{ regex }}"{% endfor %} ];
+      {% endif %}
+      }
+      {% endfor %}
+    {% endif %}
+{# users #}
+    {% if system_login_users is defined %}
+      {% for login_user in system_login_users %}
+      user {{ login_user.name }} {
+      {% if login_user.full_name is defined %}
+          full-name "{{ login_user.full_name }}";
+      {% endif %}
+      {% if login_user.uid is defined %}
+          uid {{ login_user.uid }};
+      {% endif %}
+          class {{ login_user.class }};
+      {% if ( login_user.authentication is defined ) and ( ( login_user.authentication.ssh_dsa is defined )
+      or ( login_user.authentication.ssh_ed25519 is defined ) or ( login_user.authentication.ssh_ecdsa is defined ) 
+      or ( login_user.authentication.ssh_rsa is defined ) or ( login_user.authentication.encrypted_password is defined ) ) %}
+          authentication {
+        {% if login_user.authentication.ssh_dsa is defined  %} {% for dsa_key in login_user.authentication.ssh_dsa %}
+            ssh-dsa "{{ dsa_key }}";
+          {% endfor %}
+        {% endif %}
+        {% if login_user.authentication.ssh_ecdsa is defined  %} {% for ecdsa_key in login_user.authentication.ssh_ecdsa %}
+            ssh-ecdsa "{{ ecdsa_key }}";
+          {% endfor %}
+        {% endif %}
+        {% if login_user.authentication.ssh_rsa is defined  %} {% for rsa_key in login_user.authentication.ssh_rsa %}
+            ssh-rsa "{{ rsa_key }}";
+          {% endfor %}
+        {% endif %}
+        {% if login_user.authentication.ssh_ed25519 is defined  %} {% for ed25519_key in login_user.authentication.ssh_ed25519 %}
+            ssh-ed25519 "{{ ed25519_key }}";
+          {% endfor %}
+        {% endif %}
+        {% if login_user.authentication.encrypted_password is defined  %}
+            encrypted-password "{{ login_user.authentication.encrypted_password }}";
+        {% endif %}
+        }
+       {% endif %}
+      }
+      {% endfor %}
+      {% endif %}
+{# options #}
+    {% if system_login_password_policies is defined %}
+      password {
+      {% for option in system_login_password_policies %}
+        {{ option.option }} {{ option.value }} ;
+      {% endfor %}
+      }
+    {% endif %}
+ }
+}
+
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/system/ntp.j2 b/geant/gap_ansible/roles/switch/templates/juniper/system/ntp.j2
new file mode 100644
index 0000000000000000000000000000000000000000..1db117258fc8cae02a5c5ec3f733107739403f7f
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/system/ntp.j2
@@ -0,0 +1,19 @@
+system {
+replace: ntp {
+    {% if system_switches_ntp.ntp_keys is defined %}
+      {% for ntp_key in system_switches_ntp.ntp_keys %}
+        authentication-key {{ ntp_key.id }} type {{ ntp_key.type }} value {{ ntp_key.value }} ;
+      {% endfor %}
+    {% endif %}
+    {% if system_switches_ntp.servers is defined %}
+      {% for ntp_server in system_switches_ntp.servers %}
+        server {{ ntp_server.address }} {% if ntp_server.key is defined %} key {{ ntp_server.key }} {% endif %};
+      {% endfor %}
+    {% endif %}
+    {% if system_switches_ntp.trusted_keys is defined %}
+      {% for trusted_key in system_switches_ntp.trusted_keys %}
+         trusted-key {{ trusted_key }} ;
+      {% endfor %}
+    {% endif %}
+  }
+}
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/system/radius-server.j2 b/geant/gap_ansible/roles/switch/templates/juniper/system/radius-server.j2
new file mode 100644
index 0000000000000000000000000000000000000000..f054917b088c3ba1071665e4308893c76018301f
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/system/radius-server.j2
@@ -0,0 +1,18 @@
+system {
+{% if system_radius_servers is defined %}
+   replace: radius-server { 
+      {%- for radius_server in system_radius_servers %} 
+      {{ radius_server.host }} {
+         secret "{{ radius_server.secret }}"; 
+      {% if radius_server.timeout is defined %}
+         timeout {{ radius_server.timeout }};
+      {% endif %}
+      {% if radius_server.source_address is defined %}
+         source-address {{ radius_server.source_address }};
+      {% endif %}
+      }
+      {%- endfor %}
+   {% endif %}
+   }
+}
+
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/system/services.j2 b/geant/gap_ansible/roles/switch/templates/juniper/system/services.j2
new file mode 100644
index 0000000000000000000000000000000000000000..3c37584ab7752b3a7c612f7ace32a965a5a2dfe0
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/system/services.j2
@@ -0,0 +1,24 @@
+system {
+replace: services {
+    ssh {
+        root-login deny;
+        no-tcp-forwarding;
+        protocol-version v2;
+        sftp-server;
+{% if system_services_ssh_conf is defined %}
+        max-sessions-per-connection {{ system_services_ssh_conf.max_sessions_per_connection }} ;
+    {% if system_services_ssh_conf.ciphers is defined %}
+        ciphers [ {% for cipher in system_services_ssh_conf.ciphers %}"{{cipher}}" {% endfor %}]; 
+    {% endif %}
+    {% if system_services_ssh_conf.key_exchanges is defined %}
+        key-exchange [ {% for key_exchange in system_services_ssh_conf.key_exchanges %}"{{key_exchange}}" {% endfor %}]; 
+    {% endif %}
+        connection-limit {{ system_services_ssh_conf.connection_limit }};
+        rate-limit {{ system_services_ssh_conf.rate_limit }};
+{% endif %}
+    } 
+    netconf {
+        ssh;
+    }
+  }
+}
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/system/syslog.j2 b/geant/gap_ansible/roles/switch/templates/juniper/system/syslog.j2
new file mode 100644
index 0000000000000000000000000000000000000000..e8867b368aa5c69991a636f0f6f30cec26d23bc0
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/system/syslog.j2
@@ -0,0 +1,78 @@
+system {
+  replace: syslog {
+    user * {
+            any emergency;
+        }
+    {% if system_syslog_time_format_options is defined %}
+    time-format {% for syslog_time_format_option in system_syslog_time_format_options %}{{ syslog_time_format_option }} {% endfor %};
+    {% endif %}
+    {% if system_syslog_servers is defined %}
+      {% for syslog_server in system_syslog_servers %}
+      host {{ syslog_server.address }} {
+	 {% for facility  in syslog_server.facilities %}
+         {{ facility.name }} {{ facility.level }};
+	 {% endfor %}
+	 {% if syslog_server.match is defined %}
+         match "{{ syslog_server.match }}"; 
+	 {% endif %}
+         {% if syslog_server.port is defined %}
+	     port {{ syslog_server.port }} 
+         {% endif %}
+         {% if syslog_server.source_address is defined %}
+         source-address {{ syslog_server.source_address }} ;
+         {% endif %}
+	{% if syslog_server.structured_data is defined  %}
+	    {% if syslog_server.structured_data == "default"  %}
+         structured-data;
+	    {% elif syslog_server.structured_data == "brief"  %}
+         structured-data brief;
+	    {% endif %}
+	 {% endif %}
+	 {% if syslog_server.allow_duplicates is defined  %}
+	    {% if syslog_server.allow_duplicates == True  %}
+         allow-duplicates ;
+	    {% endif %}
+	 {% endif %}
+	} 
+      {% endfor %}
+{#    {%- else %} #}
+{#    {{ raise('ERROR: No syslog servers configured') }}#}
+    {% endif %}
+    {% if system_syslog_source_address is defined %}
+    source-address {{ system_syslog_source_address }} ;
+    {% endif %}
+    {% if system_syslog_files is defined %}
+    {% for syslog_file in system_syslog_files %}
+    file {{ syslog_file.filename }} {
+        {% for facility  in syslog_file.facilities %}
+        {{ facility.name }} {{ facility.level }};
+        {% endfor %}
+	{% if syslog_file.match is defined %}
+        match "{{ syslog_file.match }}"; 
+	{% endif %}
+  {% if syslog_file.authorization is defined %}
+   authorization {{ syslog_file.authorization }};
+  {% endif %}
+	{% if syslog_file.archive_options is defined %}
+        archive {% if syslog_file.archive_options.files is defined %} files {{ syslog_file.archive_options.files }} {% endif %} {% if syslog_file.archive_options.size is defined %} size {{ syslog_file.archive_options.size }} {% endif %} 
+	{% endif %}
+	{% if syslog_file.structured_data is defined  %}
+	    {% if syslog_file.structured_data == "default"  %}
+         structured-data ;
+	    {% elif syslog_file.structured_data == "brief"  %}
+         structured-data brief;
+	    {% endif %}
+	{% endif %}
+	{% if syslog_file.allow_duplicates is defined  %}
+	   {% if syslog_file.allow_duplicates == True  %}
+        allow-duplicates ;
+	   {% endif %}
+	{% endif %}
+     }
+    {% endfor %}
+    {% endif %}
+  }
+}
+
+
+
diff --git a/geant/gap_ansible/roles/switch/templates/juniper/system/system_global.j2 b/geant/gap_ansible/roles/switch/templates/juniper/system/system_global.j2
new file mode 100644
index 0000000000000000000000000000000000000000..9bff2d504645cd088c8a0362d868697af5d2cbd8
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/templates/juniper/system/system_global.j2
@@ -0,0 +1,11 @@
+{% include 'system/general.j2' %}
+
+{% include 'system/ntp.j2' %}
+
+{% include 'system/radius-server.j2' %}
+
+{% include 'system/services.j2' %}
+
+{% include 'system/syslog.j2' %}
+
+{% include 'system/login.j2' %}
\ No newline at end of file
diff --git a/geant/gap_ansible/roles/switch/tests/inventory b/geant/gap_ansible/roles/switch/tests/inventory
new file mode 100644
index 0000000000000000000000000000000000000000..878877b0776c44f55fc4e458f70840f31da5bb01
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/tests/inventory
@@ -0,0 +1,2 @@
+localhost
+
diff --git a/geant/gap_ansible/roles/switch/tests/test.yml b/geant/gap_ansible/roles/switch/tests/test.yml
new file mode 100644
index 0000000000000000000000000000000000000000..16c200e59d80a9c2e16fa17c3438e5e114ab5b87
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/tests/test.yml
@@ -0,0 +1,5 @@
+---
+- hosts: localhost
+  remote_user: root
+  roles:
+    - switch
diff --git a/geant/gap_ansible/roles/switch/vars/main.yml b/geant/gap_ansible/roles/switch/vars/main.yml
new file mode 100644
index 0000000000000000000000000000000000000000..72dcfdba2a665adb2ff1a75d830043429def69be
--- /dev/null
+++ b/geant/gap_ansible/roles/switch/vars/main.yml
@@ -0,0 +1,21 @@
+---
+# vars file for switch
+
+dry_run: True
+
+verbs:
+  - deploy
+  - verify
+
+snmp_location: "{{ subscription.switch.switch_site.site_city }},{{ subscription.switch.switch_site.site_country }},[{{ subscription.switch.switch_site.site_latitude }},{{ subscription.switch.switch_site.site_longitude }}]"
+
+switch_model_map:
+  EX3400_24p:
+    ports: 24
+    client_ports_prefix: "ge-0/0"
+  EX3400_48p:
+    ports: 48
+    client_ports_prefix: "ge-0/0"
+  EX3400_32p:
+    ports: 32
+    client_ports_prefix: "ge-0/0"