set zsh as login shell
install various packages
This commit is contained in:
parent
f0fd0bd7f5
commit
6670ffafa9
5 changed files with 41 additions and 13 deletions
|
@ -9,11 +9,11 @@
|
|||
## TODO
|
||||
|
||||
- Git config (git config --global user.email "pim@kunis.nl", git config --global user.name "Pim Kunis", set vim as editor)
|
||||
- Install keepassxc
|
||||
- Install nextcloud
|
||||
- Install bashrc
|
||||
- Install latest neovim
|
||||
- Install zsh
|
||||
- Install i3 config
|
||||
- Install git
|
||||
- Install make
|
||||
- Install libreoffice
|
||||
- Install GIMP
|
||||
- Install Telegram
|
||||
- Install Signal
|
||||
|
|
3
ansible.cfg
Normal file
3
ansible.cfg
Normal file
|
@ -0,0 +1,3 @@
|
|||
[defaults]
|
||||
# (pathspec) Colon separated paths in which Ansible will search for Roles.
|
||||
roles_path=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles
|
|
@ -1,10 +1,4 @@
|
|||
- name: prerequisites
|
||||
- name: Configure system
|
||||
hosts: self
|
||||
tasks:
|
||||
- name: update repositories
|
||||
become: true
|
||||
apt:
|
||||
upgrade: yes
|
||||
state: latest
|
||||
update_cache: yes
|
||||
cache_valid_time: 86400 # One day
|
||||
roles:
|
||||
- system
|
||||
|
|
5
roles/system/facts/login_shell.fact
Executable file
5
roles/system/facts/login_shell.fact
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
LOGINSHELL=`getent passwd $USER | cut -d: -f7`
|
||||
echo \"${LOGINSHELL}\"
|
26
roles/system/tasks/main.yml
Normal file
26
roles/system/tasks/main.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
- name: Update repositories
|
||||
become: true
|
||||
apt:
|
||||
upgrade: yes
|
||||
state: latest
|
||||
update_cache: yes
|
||||
cache_valid_time: 86400 # One day
|
||||
- name: Install global packages
|
||||
become: true
|
||||
apt:
|
||||
state: latest
|
||||
pkg:
|
||||
- git
|
||||
- make
|
||||
- keepassxc
|
||||
- zsh
|
||||
- name: Check login shell
|
||||
setup:
|
||||
fact_path: "{{ role_path }}/facts"
|
||||
- name: Print all available facts
|
||||
ansible.builtin.debug:
|
||||
var: ansible_facts
|
||||
- name: Set default shell to zsh
|
||||
become: true
|
||||
shell: usermod -s $(which zsh) {{ ansible_user_id }}
|
||||
when: ansible_facts.ansible_local.login_shell.find('zsh') == -1
|
Reference in a new issue