aboutsummaryrefslogtreecommitdiffstats
path: root/roles/_workstation/packages/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/_workstation/packages/tasks')
-rw-r--r--roles/_workstation/packages/tasks/main.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/roles/_workstation/packages/tasks/main.yml b/roles/_workstation/packages/tasks/main.yml
new file mode 100644
index 0000000..798eafa
--- /dev/null
+++ b/roles/_workstation/packages/tasks/main.yml
@@ -0,0 +1,49 @@
+
+# workstation ~~ roles/_workstation/packages/tasks/main.yml
+# install packages for all distributions
+
+---
+
+- name: install packages for Archlinux
+ shell: |
+ pacman --noconfirm --needed -Sy {{ item | join(" ") }}
+ loop:
+ - "{{ pkgs_common }}"
+ - "{{ pkgs_archlinux }}"
+ no_log: true
+ register: out
+ ignore_errors: true
+ when: ansible_distribution == "Archlinux"
+
+- name: install packages for OpenBSD
+ shell: pkg_add -z {{ item | join(" ") }}
+ loop:
+ - "{{ pkgs_common }}"
+ - "{{ pkgs_openbsd }}"
+ no_log: true
+ register: out
+ ignore_errors: true
+ when: ansible_distribution == "OpenBSD"
+
+- name: packages installation output
+ debug:
+ msg: |
+ {% for item in out.results %}
+ - {{ item.cmd }}
+ {% for type in ["stdout_lines", "stderr_lines"] if item[type] %}
+ -- {{ type }}
+ {% for line in item[type] %}
+ --- {{ line }}
+ {% endfor %}
+ {% endfor %}
+ {% endfor %}
+ when: out is defined
+
+- name: show installation informations
+ debug:
+ msg: |
+ {% if out is defined %}
+ Installed all packages for system : {{ ansible_distribution }}
+ {% else %}
+ No installation methode for system : {{ ansible_distribution }}. Please patch and commit.
+ {% endif %}
remember that computers suck.