summaryrefslogtreecommitdiffstats
path: root/dummy-package/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'dummy-package/tasks/main.yml')
-rw-r--r--dummy-package/tasks/main.yml41
1 files changed, 41 insertions, 0 deletions
diff --git a/dummy-package/tasks/main.yml b/dummy-package/tasks/main.yml
new file mode 100644
index 0000000..921e4c6
--- /dev/null
+++ b/dummy-package/tasks/main.yml
@@ -0,0 +1,41 @@
+---
+- name: Create and install dummy package
+ block:
+ - name: Install equivs
+ apt:
+ name: equivs
+ state: present
+ update_cache: yes
+
+ - name: Create temporary directory for packages
+ tempfile:
+ state: directory
+ register: tempdir
+
+ - name: Create dummy packages
+ script: scripts/dummy-package.sh "{{ tempdir.path }}" "{{ item }}"
+ args:
+ executable: bash
+ loop: "{{ dummy_packages }}"
+
+ - name: Register newly created packages
+ find:
+ path: "{{ tempdir.path }}"
+ pattern: '*.deb'
+ register: deb_files
+
+ - name: Install dummy packages
+ apt:
+ deb: "{{ item.path }}"
+ loop: "{{ deb_files.files }}"
+
+ - name: Hold on to dummy packages
+ command: "apt-mark hold {{ item }}"
+ loop: "{{ dummy_packages }}"
+
+ - name: Remove temporary directory
+ file:
+ path: "${{ tempdir.path }}"
+ state: absent
+ when:
+ - dummy_packages is defined