peach-package-builder/ansible/debianrep.yml

41 lines
1.3 KiB
YAML

---
- name: ensure debian rep directory
action: file dest="{{debian_rep_dir}}" state=directory
- name: ensure debian rep conf directory
action: file dest="{{debian_rep_dir}}/conf" state=directory
- name: create debian distributions file
template:
src: debian/distributions
dest: "{{debian_rep_dir}}/conf/distributions"
- name: create debian options file
action: template src=debian/options dest="{{debian_rep_dir}}/conf/options"
- name: create debian override file
action: template src=debian/override.buster dest="{{debian_rep_dir}}/conf/override.buster"
# couldn't easily figure out how to automate gpg key creation, so this step can be manual
# gpg --gen-key
- name: export public gpg key to be served by web server
command: gpg --armor --output {{web_dir}}/repos/apt/peach_pub.gpg --export {{gpg_key_id}}
args:
creates: "{{web_dir}}/repos/apt/peach_pub.gpg"
- name: install reprepro
apt: pkg=reprepro
- name: install toolchain for cross-compilation
command: /root/.cargo/bin/rustup toolchain install nightly-aarch64-unknown-linux-gnu
- name: install aarch644 gcc
apt: pkg=gcc-aarch64-linux-gnu
- name: create debian repo nginx site config
action: template src=templates/debian/nginx_debian.conf dest=/etc/nginx/sites-enabled/debianrep.conf
notify:
- restart nginx