aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2021-01-19 23:05:30 +0100
committerbinary <me@rgoncalves.se>2021-01-19 23:05:30 +0100
commit332573ae82b9ab65dc3e2df140c1449fe4f81f59 (patch)
treece802bfb256034e07a4890f3348f35e606a7ac6c /roles
parentf45e95d70ea1085ce5511cc745882bb654474d44 (diff)
downloadinfrastructure-332573ae82b9ab65dc3e2df140c1449fe4f81f59.tar.gz
Rewrite basic roles with simple syntax
Diffstat (limited to 'roles')
-rw-r--r--roles/dns/tasks/main.yml2
-rw-r--r--roles/tools/tasks/main.yml29
-rw-r--r--roles/users/tasks/main.yml2
3 files changed, 10 insertions, 23 deletions
diff --git a/roles/dns/tasks/main.yml b/roles/dns/tasks/main.yml
index 41cfe8e..3e84009 100644
--- a/roles/dns/tasks/main.yml
+++ b/roles/dns/tasks/main.yml
@@ -4,7 +4,7 @@
---
-- name: ensure dns
+- name: ensure dns are up to date
template:
src: resolv.conf.j2
dest: /etc/resolv.conf
diff --git a/roles/tools/tasks/main.yml b/roles/tools/tasks/main.yml
index fae66c6..5e8dada 100644
--- a/roles/tools/tasks/main.yml
+++ b/roles/tools/tasks/main.yml
@@ -7,37 +7,24 @@
- set_fact:
packages: "{{ packages[ansible_distribution | lower] }}"
-- name: install sysadmin tools
- package: state=present name="{{ item }}"
- loop:
- - tmux
- - htop
- - "{{ ansible_become_method }}"
- #failed_when: false
- ignore_errors: true
-
- name: install per distribution correspond tools
package: state=present name="{{ item }}"
loop:
- - "{{ packages.neovim }}"
- "{{ packages.sshfs }}"
- "{{ packages.wireguard }}"
- "{{ packages.extra if packages.extra is defined }}"
ignore_errors: true
-- name: install misc utils
- package: state=present name="{{ item }}"
+
+- name: install global utils
+ package: name="{{ item }}" state=present
loop:
- - figlet
- curl
- - wget
+ - figlet
- git
+ - htop
+ - neovim
+ - tmux
+ - wget
- zsh
- #failed_when: false
ignore_errors: true
-
-- name: install scripts repository
- git:
- repo: "https://gitlab.com/rgoncalves.se/infrastructure/infrastructure-scripts"
- dest: /data/scripts
- force: true
diff --git a/roles/users/tasks/main.yml b/roles/users/tasks/main.yml
index 0a0e259..7c37a30 100644
--- a/roles/users/tasks/main.yml
+++ b/roles/users/tasks/main.yml
@@ -34,5 +34,5 @@
owner: root
group: "{{ group_root }}"
mode: 0644
- when: ansible_become_method == "doas"
+ when: ansible_become_method == "doas" or ansible_distribution == "OpenBSD"
remember that computers suck.