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

`promote_p_to_pe` - update to use new storage path

parent 3603f9ed
No related branches found
No related tags found
1 merge request!260Feature/nat 1090 common storage
...@@ -9,57 +9,50 @@ ...@@ -9,57 +9,50 @@
ansible_host: "localhost" ansible_host: "localhost"
ansible_connection: local ansible_connection: local
- name: Create a folder for all the things - name: Print the template in "{{ play_storage_path }}/pe_promotion_base_config.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 }}/pe_promotion_base_config.conf"
when: verb == "deploy_pe_base_config" when: verb == "deploy_pe_base_config"
ansible.builtin.template: ansible.builtin.template:
src: "routers/{{ subscription.router.vendor }}/pe_promotion_base_config.j2" src: "routers/{{ subscription.router.vendor }}/pe_promotion_base_config.j2"
dest: "/var/tmp/ansible_run_{{ opid }}/pe_promotion_base_config.conf" dest: "{{ play_storage_path }}/pe_promotion_base_config.conf"
lstrip_blocks: true lstrip_blocks: true
trim_blocks: true trim_blocks: true
mode: '0755' mode: '0755'
delegate_to: localhost delegate_to: localhost
- name: Print the template in "/var/tmp/ansible_run_{{ opid }}/pe_promotion_base_vprn.conf" - name: Print the template in "{{ play_storage_path }}/pe_promotion_base_vprn.conf"
when: verb == "deploy_routing_instances" when: verb == "deploy_routing_instances"
ansible.builtin.template: ansible.builtin.template:
src: "routers/{{ subscription.router.vendor }}/pe_promotion_base_vprn.j2" src: "routers/{{ subscription.router.vendor }}/pe_promotion_base_vprn.j2"
dest: "/var/tmp/ansible_run_{{ opid }}/pe_promotion_base_vprn.conf" dest: "{{ play_storage_path }}/pe_promotion_base_vprn.conf"
lstrip_blocks: true lstrip_blocks: true
trim_blocks: true trim_blocks: true
mode: '0755' mode: '0755'
- name: Print the template in "/var/tmp/ansible_run_{{ opid }}/pe_update_sdp.conf" - name: Print the template in "{{ play_storage_path }}/pe_update_sdp.conf"
when: verb == "update_sdp_mesh" when: verb == "update_sdp_mesh"
ansible.builtin.template: ansible.builtin.template:
src: "routers/{{ subscription.router.vendor }}/pe_update_sdp.j2" src: "routers/{{ subscription.router.vendor }}/pe_update_sdp.j2"
dest: "/var/tmp/ansible_run_{{ opid }}/pe_update_sdp.conf" dest: "{{ play_storage_path }}/pe_update_sdp.conf"
lstrip_blocks: true lstrip_blocks: true
trim_blocks: true trim_blocks: true
mode: '0755' mode: '0755'
delegate_to: localhost delegate_to: localhost
- name: Print the template in "/var/tmp/ansible_run_{{ opid }}/delete_default_static_routes.conf" - name: Print the template in "{{ play_storage_path }}/delete_default_static_routes.conf"
when: verb == "delete_default_routes" when: verb == "delete_default_routes"
ansible.builtin.template: ansible.builtin.template:
src: "routers/{{ subscription.router.vendor }}/router/delete_default_static_routes.j2" src: "routers/{{ subscription.router.vendor }}/router/delete_default_static_routes.j2"
dest: "/var/tmp/ansible_run_{{ opid }}/delete_default_static_routes.conf" dest: "{{ play_storage_path }}/delete_default_static_routes.conf"
lstrip_blocks: true lstrip_blocks: true
trim_blocks: true trim_blocks: true
mode: '0755' mode: '0755'
delegate_to: localhost delegate_to: localhost
- name: Print the template in "/var/tmp/ansible_run_{{ opid }}/pe_promotion_static_routes.conf" - name: Print the template in "{{ play_storage_path }}/pe_promotion_static_routes.conf"
when: verb == "add_pe_static_routes" when: verb == "add_pe_static_routes"
ansible.builtin.template: ansible.builtin.template:
src: "routers/{{ subscription.router.vendor }}/router/pe_promotion_static_routes.j2" src: "routers/{{ subscription.router.vendor }}/router/pe_promotion_static_routes.j2"
dest: "/var/tmp/ansible_run_{{ opid }}/pe_promotion_static_routes.conf" dest: "{{ play_storage_path }}/pe_promotion_static_routes.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
...@@ -37,18 +37,13 @@ ...@@ -37,18 +37,13 @@
ansible_connection: "{{ netconf_access[subscription.router.vendor].ansible_connection }}" ansible_connection: "{{ netconf_access[subscription.router.vendor].ansible_connection }}"
ansible_network_os: "{{ netconf_access[subscription.router.vendor].ansible_network_os }}" ansible_network_os: "{{ netconf_access[subscription.router.vendor].ansible_network_os }}"
- name: Generate an ID for this run
ansible.builtin.set_fact:
opid: "{{ lookup('community.general.random_string', length=18, special=false) }}"
- name: Print the ID
ansible.builtin.debug:
msg: "{{ opid }}"
#
# - name: Include ISIS overload tasks # - name: Include ISIS overload tasks
# when: verb in ['set_isis_overload', 'remove_isis_overload'] # when: verb in ['set_isis_overload', 'remove_isis_overload']
# ansible.builtin.include_tasks: configure_isis_overload.yaml # ansible.builtin.include_tasks: configure_isis_overload.yaml
- name: Include configure storage tasks
ansible.builtin.include_tasks: configure_storage.yaml
- name: Include templates compilation - name: Include templates compilation
when: verb in [ 'deploy_pe_base_config', 'update_sdp_mesh', 'deploy_routing_instances', 'delete_default_routes', 'add_pe_static_routes' ] when: verb in [ 'deploy_pe_base_config', 'update_sdp_mesh', 'deploy_routing_instances', 'delete_default_routes', 'add_pe_static_routes' ]
ansible.builtin.include_tasks: compile.yaml ansible.builtin.include_tasks: compile.yaml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment