diff options
author | binary <me@rgoncalves.se> | 2021-03-11 15:45:49 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2021-03-11 15:45:49 +0100 |
commit | 37b208966573898f3c66e12e70091508b9e84258 (patch) | |
tree | 5f5fb4618f184996c910d71f7c255ec808fe4727 /roles/tools | |
parent | 3ee94802474582608ca1e0d6e4bdbe89a4d1cb8d (diff) | |
download | infrastructure-37b208966573898f3c66e12e70091508b9e84258.tar.gz |
Make packages installation inventoy agnostic.
Diffstat (limited to 'roles/tools')
-rw-r--r-- | roles/tools/tasks/main.yml | 26 | ||||
-rw-r--r-- | roles/tools/vars/main.yml | 29 |
2 files changed, 35 insertions, 20 deletions
diff --git a/roles/tools/tasks/main.yml b/roles/tools/tasks/main.yml index 5e8dada..84fe4cb 100644 --- a/roles/tools/tasks/main.yml +++ b/roles/tools/tasks/main.yml @@ -4,27 +4,13 @@ --- -- set_fact: - packages: "{{ packages[ansible_distribution | lower] }}" - - name: install per distribution correspond tools - package: state=present name="{{ item }}" - loop: - - "{{ packages.sshfs }}" - - "{{ packages.wireguard }}" - - "{{ packages.extra if packages.extra is defined }}" - ignore_errors: true + package: + state: present + name: "{{ tools_pkgs[ansible_distribution | lower] }}" - name: install global utils - package: name="{{ item }}" state=present - loop: - - curl - - figlet - - git - - htop - - neovim - - tmux - - wget - - zsh - ignore_errors: true + package: + name: "{{ tools_pkgs[common] }}" + state: present diff --git a/roles/tools/vars/main.yml b/roles/tools/vars/main.yml index a5346e5..c569299 100644 --- a/roles/tools/vars/main.yml +++ b/roles/tools/vars/main.yml @@ -3,3 +3,32 @@ --- +tools_pkgs: + + common: + - curl + - figlet + - git + - htop + - neovim + - neovim + - wget + - zsh + + alpine: + - ip6tables + - shadow + - sshfs + - tmux + - wireguard-tools + - wireguard-virt + + freebsd: + - fusefs-sshfs + - tmux + - wireguard + + openbsd: + - sshfs-fuse + - tmux + - wireguard-tools |