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

Merge branch 'feature/nat-1090-common-storage' into 'develop'

Feature/nat 1090 common storage

See merge request !260
parents be68df6b 830536bf
No related branches found
No related tags found
1 merge request!260Feature/nat 1090 common storage
Pipeline #93687 passed
...@@ -7,9 +7,17 @@ ...@@ -7,9 +7,17 @@
ansible.builtin.debug: ansible.builtin.debug:
msg: "{{ opid }}" msg: "{{ opid }}"
- name: Import group_vars/all
ansible.builtin.include_vars:
dir: /opt/ansible_inventory/group_vars/all
- name: Generate FS path for artifacts storage
ansible.builtin.set_fact:
play_storage_path: "{{ storage_mount_prefix | default('/var/tmp') }}/{{ gso_process_id | default('gso_pid_undefined') }}/ansible_run_{{ opid }}"
- name: Create a folder for all compiled output - name: Create a folder for all compiled output
ansible.builtin.file: ansible.builtin.file:
path: "/var/tmp/ansible_run_{{ opid }}" path: "{{ play_storage_path }}"
state: directory state: directory
mode: "0755" mode: '0755'
delegate_to: localhost delegate_to: localhost
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
ansible_host: "localhost" ansible_host: "localhost"
ansible_connection: local ansible_connection: local
- name: Print the template in "/var/tmp/ansible_run_{{ opid }}/VRF.conf" - name: Print the template in "{{ play_storage_path }}/VRF.conf"
# when: verb in ["deploy", "update", "terminate"] # when: verb in ["deploy", "update", "terminate"]
ansible.builtin.template: ansible.builtin.template:
src: "service.j2" src: "service.j2"
dest: "/var/tmp/ansible_run_{{ opid }}/VRF.conf" dest: "{{ play_storage_path }}/VRF.conf"
lstrip_blocks: true lstrip_blocks: true
trim_blocks: true trim_blocks: true
mode: '0755' mode: '0755'
......
- name: Generate an ID for this run
ansible.builtin.set_fact:
opid: "{{ lookup('community.general.random_string', length=18, special=false) }}"
- name: Import group_vars/all
ansible.builtin.include_vars:
dir: /opt/ansible_inventory/group_vars/all
- name: Generate FS path for artifacts storage
ansible.builtin.set_fact:
play_storage_path: "{{ storage_mount_prefix | default('/var/tmp') }}/{{ gso_process_id | default('gso_pid_undefined') }}/ansible_run_{{ opid }}"
- name: Create a folder for all compiled output
ansible.builtin.file:
path: "{{ play_storage_path }}"
state: directory
mode: '0755'
delegate_to: localhost
- name: Print storage path for the play
ansible.builtin.debug:
msg: "{{ play_storage_path }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment