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

`iptrunk_twamp` - update to use updated storage path

parent b7abfcfc
No related branches found
No related tags found
1 merge request!260Feature/nat 1090 common storage
......@@ -7,15 +7,15 @@
- name: Create a folder for all the templates
ansible.builtin.file:
path: "/var/tmp/ansible_run_{{ opid }}"
path: "{{ play_storage_path }}"
state: directory
mode: '0755'
delegate_to: localhost
- name: Print the template in "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf"
- name: Print the template in "{{ play_storage_path }}/{{ config_object }}.conf"
ansible.builtin.template:
src: "{{ local_side.iptrunk_side_node.vendor }}/{{ config_object }}.j2"
dest: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf"
dest: "{{ play_storage_path }}/{{ config_object }}.conf"
lstrip_blocks: true
trim_blocks: true
mode: '0755'
......
../../../playbooks/configure_storage.yaml
\ No newline at end of file
......@@ -2,7 +2,7 @@
- name: Deploy "{{ config_object }}" on "{{ inventory_hostname }}" [CHECK ONLY][JUNIPER]
junipernetworks.junos.junos_config:
update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf"
src: "{{ play_storage_path }}/{{ config_object }}.conf"
src_format: text
check_commit: true
diff: true
......@@ -25,7 +25,7 @@
- name: Deploy "{{ config_object }}" on "{{ inventory_hostname }}" [AND COMMIT][JUNIPER]
junipernetworks.junos.junos_config:
update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf"
src: "{{ play_storage_path }}/{{ config_object }}.conf"
src_format: text
comment: "{{ commit_comment }}"
diff: true
......
......@@ -9,10 +9,12 @@
ansible.builtin.include_vars:
dir: /opt/ansible_inventory/group_vars/routers
- name: Set an ID for this run
ansible.builtin.set_fact:
opid: "{{ lookup('community.general.random_string', length=18, special=false) }}"
config_is_different: "False"
- name: Include configure storage tasks
ansible.builtin.include_tasks: configure_storage.yaml
# - name: Set "config_is_different" var
# ansible.builtin.set_fact:
# config_is_different: "False"
- name: Load local info
ansible.builtin.set_fact:
......@@ -38,10 +40,6 @@
when:
( local_side.iptrunk_side_node.router_access_via_ts | ansible.builtin.bool )
- name: Print the ID
ansible.builtin.debug:
msg: "{{ opid }}"
- name: Set short router names for local and remote sides
ansible.builtin.set_fact:
local_side_short_name: '{{ local_side.iptrunk_side_node.router_fqdn | replace(domain_name_regex, "") }}'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment