_packagemirror.yml 633 Bytes
Newer Older
Pietsch, Martin's avatar
Pietsch, Martin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

- name: set ABI variable
  set_fact:
    FBSD_ABI: "{{ 'FreeBSD:%s:%s' | format(distdata[1] | regex_replace('\\.[0-9]*', ''), distdata[0]) }}"

- name: set package path varible
  set_fact:
    pkg_path: "{{ '%s/FreeBSD/%s' | format(system_mirror_directory, FBSD_ABI) }}"

- name: create package directories
  file:
    path: "{{ pkg_path }}"
    recurse: yes
    state: directory

- name: fetch packages
  shell: "{{ 'pkg fetch -q -y -d -o %s %s' | format(pkg_path, system_gathered_packages | join(' ')) }}"
  environment:
    ABI: "{{ FBSD_ABI }}"

- name: create reposity data
  shell: "{{ 'pkg repo %s' | format(pkg_path) }}"