mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
805 B
YAML
37 lines
805 B
YAML
7 years ago
|
- block:
|
||
|
- name: Install needed packages
|
||
|
apt:
|
||
|
name: "{{ item }}"
|
||
|
with_items:
|
||
|
- dpkg-dev
|
||
|
- equivs
|
||
|
- libfile-fcntllock-perl # to silence warning by equivs-build
|
||
|
|
||
|
- set_fact:
|
||
|
repodir: /tmp/repo/
|
||
|
|
||
|
- name: Create repo dir
|
||
|
file:
|
||
|
path: "{{ repodir }}"
|
||
|
state: directory
|
||
|
mode: 0755
|
||
|
|
||
|
- name: Create deb files
|
||
|
shell: "equivs-build {{ item }}"
|
||
|
args:
|
||
|
chdir: "{{ repodir }}"
|
||
|
with_fileglob:
|
||
|
- "files/package_specs/*"
|
||
|
|
||
|
- name: Create repo
|
||
|
shell: dpkg-scanpackages --multiversion . /dev/null | gzip -9c > Packages.gz
|
||
|
args:
|
||
|
chdir: "{{ repodir }}"
|
||
|
|
||
|
- name: Install the repo
|
||
|
apt_repository:
|
||
|
repo: "deb file:{{ repodir }} ./"
|
||
|
validate_certs: no
|
||
|
|
||
|
when: ansible_distribution in ['Ubuntu', 'Debian']
|