Changeset View
Changeset View
Standalone View
Standalone View
roles/dpkg-repo/repo/init.sls
- This file was added.
# ------------------------------------------------------------- | |||||
# Salt — Dpkg repository | |||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |||||
# Project: Nasqueron | |||||
# License: Trivial work, not eligible to copyright | |||||
# ------------------------------------------------------------- | |||||
{% from "roles/debian-repo/map.jinja" import repo with context %} | |||||
# ------------------------------------------------------------- | |||||
# Install repository utilities | |||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |||||
{{ repo.package }}: | |||||
pkg.installed | |||||
# ------------------------------------------------------------- | |||||
# Create repository directory | |||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |||||
{{ repo.repo_dir }}: | |||||
file.directory: | |||||
- makedirs: True | |||||
- user: builder | |||||
# ------------------------------------------------------------- | |||||
# Download deb packages to host | |||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |||||
{% from "roles/debian-repo/map.jinja" import packages_deb with context %} | |||||
{% for package, url in packages_deb.iteritems() %} | |||||
{{ package }}: | |||||
cmd.run: | |||||
- name: curl -L {{ url }} -o {{ repo.repo_dir ~ package }} | |||||
- creates: {{ repo.repo_dir ~ package }} | |||||
{% endfor %} | |||||
# ------------------------------------------------------------- | |||||
# Download deb packages to host | |||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |||||
scan_packages: | |||||
cmd.run: | |||||
- name: dpkg-scanpackages {{ repo.repo_dir }} /dev/null > {{ repo.repo_dir ~ 'Release' }} | |||||
Nasqueron DevCentral · If it had been much bigger the moon would have had a core of ice. · Powered by Phabricator