Add FreeBSD support

This commit is contained in:
Jannik Beyerstedt 2021-05-02 15:37:03 +02:00
parent abb361290f
commit d956618d86
4 changed files with 91 additions and 0 deletions

View file

@ -0,0 +1,17 @@
---
# Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip) - FreeBSD Version
- name: essentials - Install essential utilities
become: yes
ansible.builtin.package:
name: "{{ packages }}"
state: present
vars:
packages:
- git
- curl
- wget
- zsh
- vim
- tmux
- python3

15
tasks/tools-FreeBSD.yml Normal file
View file

@ -0,0 +1,15 @@
---
# Common/Tools: Additional Tools (depending on OS) - FreeBSD Version
# (bind-tools includes dig)
- name: tools - Install basic utilities
become: yes
ansible.builtin.package:
name: "{{ packages }}"
state: present
vars:
packages:
- rsync
- bind-tools
- htop
- unzip

View file

@ -0,0 +1,44 @@
---
# Common/Usersetup: Auto-setup a user shell and prepare dotfiles - FreeBSD Version
# Will run once per user, because of lockfile `~/.ansbl-common-usersetup`
- name: usersetup - Check, if usersetup already ran
stat:
path: .ansbl-common-usersetup
register: common_usersetup
- name: usersetup - Change login shell to zsh for current user
become: yes
user:
name: "{{ ansible_user_id }}"
shell: /usr/local/bin/zsh
when:
- common_usersetup.stat.exists == false and usersetup_chsh == true
# - name: usersetup - Install locales package
# become: yes
# apt:
# name: locales
# state: present
# - name: usersetup - Setup locale en_US
# become: yes
# locale_gen:
# name: en_US.UTF-8
# state: present
# when:
# - common_usersetup.stat.exists == false
# - name: usersetup - Setup locale de_DE
# become: yes
# locale_gen:
# name: de_DE.UTF-8
# state: present
# when:
# - common_usersetup.stat.exists == false
- name: usersetup - Create lockfile
file:
path: .ansbl-common-usersetup
state: touch
when:
- common_usersetup.stat.exists == false

View file

@ -0,0 +1,15 @@
---
# Common/Usertools: User's Main Machine/ Developer Tools - FreeBSD Version
- name: usertools - Install user's working utilities
become: yes
ansible.builtin.package:
name: "{{ packages }}"
state: present
vars:
packages:
- nmap
- rsync
- icdiff
- iftop
#- ansible