Skip to content
Snippets Groups Projects
Commit b9654255 authored by Simone Spinelli's avatar Simone Spinelli
Browse files

Adjust base config role and change all dryrun to dry_run

parent b8cd7d87
Branches
Tags
1 merge request!7Modifications to iptrunk domain model
......@@ -12,12 +12,12 @@
check: yes
commit: no
register: response
when: verb == "deploy" and dryrun == "True"
when: verb == "deploy" and dry_run == "True"
- name: Show diff for dry run
debug:
msg: "{{ response }}"
when: verb == "deploy" and dryrun == "True"
when: verb == "deploy" and dry_run == "True"
- name: Send end of operation in syslog
syslogger:
......@@ -32,12 +32,12 @@
config_mode: "private"
comment: "{{ commit_comment }}"
register: response
when: verb == "deploy" and dryrun == "False"
when: verb == "deploy" and dry_run == "False"
- name: Show diff
debug:
msg: "{{ response }}"
when: verb == "deploy" and dryrun == "False"
when: verb == "deploy" and dry_run == "False"
- name: Send end of operation in syslog
syslogger:
......
dryrun: "True"
dry_run: "True"
is_base_config_run: "True"
mytemplates:
template_name: base_config
......@@ -6,3 +6,14 @@ mytemplates:
verbs:
- "compile"
- "deploy"
#wfo_device: "{{wfo_device_json| from_json}}"
wfo_device: "{{wfo_device_json}}"
lo_ipv4_address: "{{wfo_device.device.device_lo_ipv4_address}}"
lo_ipv6_address: "{{wfo_device.device.device_lo_ipv6_address}}"
lo_iso_address: "{{wfo_device.device.device_lo_iso_address}}"
snmp_location: "An SNMP location"
si_ipv4_network: "{{wfo_device.device.device_si_ipv4_network}}"
lt_ipv4_network: "{{wfo_device.device.device_ias_lt_ipv4_network}}"
lt_ipv6_network: "{{wfo_device.device.device_ias_lt_ipv6_network}}"
site_country_code: "{{wfo_device.device.device_site.site_country_code}}"
......@@ -8,12 +8,12 @@
check: yes
commit: no
register: response
when: verb == "deploy" and dryrun | ansible.builtin.bool
when: verb == "deploy" and dry_run | ansible.builtin.bool
- name: Show DRY diff of "{{ config_object }}"
debug:
msg: "{{response}}"
when: verb == "deploy" and dryrun | ansible.builtin.bool
when: verb == "deploy" and dry_run | ansible.builtin.bool
- name: Deploy "{{config_object}}" [FOR REAL]
juniper_junos_config:
......@@ -23,9 +23,9 @@
config_mode: "private"
commit: yes
register: response
when: verb == "deploy" and not (dryrun | ansible.builtin.bool)
when: verb == "deploy" and not (dry_run | ansible.builtin.bool)
- name: Show real diff of "{{ config_object }}"
debug:
msg: "{{response}}"
when: verb == "deploy" and not (dryrun | ansible.builtin.bool)
when: verb == "deploy" and not (dry_run | ansible.builtin.bool)
......@@ -8,12 +8,12 @@
check: yes
commit: no
register: response
when: verb == "remove" and dryrun | ansible.builtin.bool
when: verb == "remove" and dry_run | ansible.builtin.bool
- name: Show DRY diff of "{{ config_object }}"
debug:
msg: "{{response}}"
when: verb == "remove" and dryrun | ansible.builtin.bool
when: verb == "remove" and dry_run | ansible.builtin.bool
- name: Deploy "{{config_object}}" [FOR REAL]
juniper_junos_config:
......@@ -23,9 +23,9 @@
config_mode: "private"
commit: yes
register: response
when: verb == "remove" and not (dryrun | ansible.builtin.bool)
when: verb == "remove" and not (dry_run | ansible.builtin.bool)
- name: Show real diff of "{{ config_object }}"
debug:
msg: "{{response}}"
when: verb == "remove" and not (dryrun | ansible.builtin.bool)
when: verb == "remove" and not (dry_run | ansible.builtin.bool)
---
# vars file for iptrunks
dryrun: "True"
dry_run: "True"
### Here I am selecting the single trunk I want to deploy
#newtrunks: "{{ trunks | selectattr('id', 'match', trunk_id ) | list }}"
verbs:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment