summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--local.yml2
-rw-r--r--tasks/dependencies.yml13
-rw-r--r--tasks/dependencies/all.yml20
-rw-r--r--tasks/dependencies/fedora.yml6
-rw-r--r--tasks/dependencies/ubuntu.yml6
5 files changed, 33 insertions, 14 deletions
diff --git a/local.yml b/local.yml
index b02e3c1..b584416 100644
--- a/local.yml
+++ b/local.yml
@@ -1,6 +1,6 @@
- hosts: localhost
tasks:
- - ansible.builtin.import_tasks: tasks/dependencies.yml
+ - ansible.builtin.import_tasks: tasks/dependencies/all.yml
- ansible.builtin.import_tasks: tasks/zsh.yml
- ansible.builtin.import_tasks: tasks/ssh.yml
- ansible.builtin.import_tasks: tasks/node.yml
diff --git a/tasks/dependencies.yml b/tasks/dependencies.yml
deleted file mode 100644
index 983fc48..0000000
--- a/tasks/dependencies.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-- name: Update Aptitude
- become: true
- ansible.builtin.apt::
- update_cache: true
- tags:
- - always
-
-- name: Install dependencies
- become: true
- ansible.builtin.apt::
- name: [curl, git, zsh, docker, fzf, tmux, stow, unzip, zip]
- tags:
- - always
diff --git a/tasks/dependencies/all.yml b/tasks/dependencies/all.yml
new file mode 100644
index 0000000..aa05885
--- /dev/null
+++ b/tasks/dependencies/all.yml
@@ -0,0 +1,20 @@
+- name: Install Ubuntu dependencies
+ ansible.builtin.import_tasks:
+ file: tasks/dependencies/ubuntu.yml
+ when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
+ tags:
+ - always
+
+- name: Install Fedora dependencies
+ ansible.builtin.import_tasks:
+ file: tasks/dependencies/fedora.yml
+ when: ansible_distribution == 'Fedora'
+ tags:
+ - always
+
+- name: Install dependencies
+ become: true
+ ansible.builtin.package:
+ name: [curl, git, zsh, docker, fzf, tmux, stow, unzip, zip]
+ tags:
+ - always
diff --git a/tasks/dependencies/fedora.yml b/tasks/dependencies/fedora.yml
new file mode 100644
index 0000000..df554c6
--- /dev/null
+++ b/tasks/dependencies/fedora.yml
@@ -0,0 +1,6 @@
+- name: Install which
+ become: true
+ ansible.builtin.package:
+ name: which
+ tags:
+ - always
diff --git a/tasks/dependencies/ubuntu.yml b/tasks/dependencies/ubuntu.yml
new file mode 100644
index 0000000..742fda3
--- /dev/null
+++ b/tasks/dependencies/ubuntu.yml
@@ -0,0 +1,6 @@
+- name: Update Aptitude
+ become: true
+ ansible.builtin.apt:
+ update_cache: true
+ tags:
+ - always