blob: faad120cebc1e330db6b0e7aefef1fbf0331530d [file] [log] [blame]
---
# onieboot tasks/main.yml
#
# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
- name: include OS-specific vars
include_vars: "{{ ansible_os_family }}.yml"
- name: include OS-specific tasks
include_tasks: "{{ ansible_os_family }}.yml"
- name: Create onieboot webroot dir (may already exist from webserver role)
file:
state: directory
path: "{{ onieboot_web_root }}/onie_dist"
owner: "{{ onieboot_username }}"
group: "{{ onieboot_groupname }}"
mode: "0755"
- name: Download all ONIE images
get_url:
url: "{{ item.url }}"
checksum: "{{ item.checksum }}"
dest: "{{ onieboot_web_root }}/onie_dist/{{ item.url | basename }}"
owner: "{{ onieboot_username }}"
group: "{{ onieboot_groupname }}"
mode: "0644"
with_items: "{{ onieboot_installers }}"
- name: Add symlink to default ONIE image location
file:
state: "link"
src: "{{ onieboot_web_root }}/onie_dist/{{ onieboot_default_installer }}"
dest: "{{ onieboot_web_root }}/onie-installer"