Skip to content
Snippets Groups Projects
Commit b7abfcfc authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

`ibgp_update` - use new storage path

parent 49704d74
No related branches found
No related tags found
1 merge request!260Feature/nat 1090 common storage
...@@ -7,17 +7,10 @@ ...@@ -7,17 +7,10 @@
( wfo_router.router.router_access_via_ts | ansible.builtin.bool ) is true ( wfo_router.router.router_access_via_ts | ansible.builtin.bool ) is true
and inventory_hostname == wfo_router.router.router_fqdn and inventory_hostname == wfo_router.router.router_fqdn
- name: Create a folder for all the things - name: Print the template in "{{ play_storage_path }}/{{ verb }}.conf"
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 }}/{{ verb }}.conf"
ansible.builtin.template: ansible.builtin.template:
src: "{{ vendor }}/{{ verb }}.j2" src: "{{ vendor }}/{{ verb }}.j2"
dest: "/var/tmp/ansible_run_{{ opid }}/{{ verb }}.conf" dest: "{{ play_storage_path }}/{{ verb }}.conf"
lstrip_blocks: true lstrip_blocks: true
trim_blocks: true trim_blocks: true
mode: '0755' mode: '0755'
......
../../../playbooks/configure_storage.yaml
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- name: Update iBGP mesh ["{{ verb }}"] on "{{ inventory_hostname }}" [CHECK ONLY][Juniper] - name: Update iBGP mesh ["{{ verb }}"] on "{{ inventory_hostname }}" [CHECK ONLY][Juniper]
junipernetworks.junos.junos_config: junipernetworks.junos.junos_config:
update: 'replace' update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/{{ verb }}.conf" src: "{{ play_storage_path }}/{{ verb }}.conf"
src_format: set src_format: set
check_commit: true check_commit: true
diff: true diff: true
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
- name: Update iBGP mesh ["{{ verb }}"] on "{{ inventory_hostname }}" [AND COMMIT][Juniper] - name: Update iBGP mesh ["{{ verb }}"] on "{{ inventory_hostname }}" [AND COMMIT][Juniper]
junipernetworks.junos.junos_config: junipernetworks.junos.junos_config:
update: 'replace' update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/{{ verb }}.conf" src: "{{ play_storage_path }}/{{ verb }}.conf"
src_format: set src_format: set
comment: "{{ commit_comment }}" comment: "{{ commit_comment }}"
diff: true diff: true
......
...@@ -26,14 +26,12 @@ ...@@ -26,14 +26,12 @@
ansible.builtin.include_vars: ansible.builtin.include_vars:
dir: /opt/ansible_inventory/group_vars/all dir: /opt/ansible_inventory/group_vars/all
- name: Generate an ID for this run - name: Set config_is_different var
ansible.legacy.set_fact: ansible.legacy.set_fact:
opid: "{{ lookup('community.general.random_string', length=18, special=false) }}"
config_is_different: "False" config_is_different: "False"
- name: Print the ID - name: Include configure storage tasks
ansible.builtin.debug: ansible.builtin.include_tasks: configure_storage.yaml
msg: "{{ opid }}"
- name: Include list of routers modification tasks - name: Include list of routers modification tasks
ansible.builtin.include_tasks: modify_router_list.yaml ansible.builtin.include_tasks: modify_router_list.yaml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment