mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-30 15:38:53 +00:00
Make pkg json manifest more readable. Create package using FreeBSD's `pkg create` instead of manually using tar. This change also simplifies the manifest to a single file for the integration test role.
35 lines
1 KiB
YAML
35 lines
1 KiB
YAML
---
|
|
- name: Create temporary directory for package creation
|
|
tempfile:
|
|
state: directory
|
|
register: pkgng_test_outofdate_pkg_tempdir
|
|
|
|
- name: Copy intentionally out-of-date package manifest to testhost
|
|
template:
|
|
src: MANIFEST.json.j2
|
|
# Plus-sign must be added at the destination
|
|
# CI doesn't like files with '+' in them in the repository
|
|
dest: '{{ pkgng_test_outofdate_pkg_tempdir.path }}/MANIFEST'
|
|
|
|
- name: Create out-of-date test package file
|
|
command:
|
|
argv:
|
|
- pkg
|
|
- create
|
|
- '--verbose'
|
|
- '--out-dir'
|
|
- '{{ pkgng_test_outofdate_pkg_tempdir.path }}'
|
|
- '--manifest'
|
|
- '{{ pkgng_test_outofdate_pkg_tempdir.path }}/MANIFEST'
|
|
warn: no
|
|
|
|
- name: Copy the created package file to the expected location
|
|
copy:
|
|
remote_src: yes
|
|
src: '{{ pkgng_test_outofdate_pkg_tempdir.path }}/{{ pkgng_test_pkg_name }}-0.pkg'
|
|
dest: '{{ pkgng_test_outofdate_pkg_path }}'
|
|
|
|
- name: Remove temporary directory
|
|
file:
|
|
state: absent
|
|
path: '{{ pkgng_test_outofdate_pkg_tempdir.path }}'
|