Add more config files to the base role.
This commit is contained in:
parent
b8658ad1dc
commit
2e0a6073c8
1
ansible/environments/laptop/group_vars/all
Normal file
1
ansible/environments/laptop/group_vars/all
Normal file
@ -0,0 +1 @@
|
|||||||
|
timezone: "America/New_York"
|
@ -31,3 +31,4 @@ users:
|
|||||||
- main_fido
|
- main_fido
|
||||||
- backup_fido
|
- backup_fido
|
||||||
- homeassistant
|
- homeassistant
|
||||||
|
gitconfig: gitconfig_home
|
||||||
|
@ -21,3 +21,4 @@ graphics_driver: "intel"
|
|||||||
build_user:
|
build_user:
|
||||||
name: talexander
|
name: talexander
|
||||||
group: talexander
|
group: talexander
|
||||||
|
gitconfig: gitconfig_home
|
||||||
|
11
ansible/roles/base/files/git_branches_by_owner_time
Normal file
11
ansible/roles/base/files/git_branches_by_owner_time
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# List git remote branches by owner
|
||||||
|
#git for-each-ref --format='%(committerdate) %09 %(authorname) %09 %(refname)' | sort -k5n -k2M -k3n -k4n
|
||||||
|
|
||||||
|
# git fetch --all --prune
|
||||||
|
# git for-each-ref --format='%(committerdate:relative) %09 %(authorname) %09 %(refname)' --sort='committerdate' | grep 'Tom Alexander'
|
||||||
|
|
||||||
|
git ls-remote --heads origin | awk '{print $1}' | while read hash; do
|
||||||
|
PAGER='' git log -n1 --pretty=format:'%Cgreen%<(20)%cr%Creset %C(bold blue)%<(20)%an%Creset %C(yellow)%d%Creset %n' "$hash"
|
||||||
|
done
|
15
ansible/roles/base/files/gitconfig_home
Normal file
15
ansible/roles/base/files/gitconfig_home
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[user]
|
||||||
|
email = tom@fizz.buzz
|
||||||
|
name = Tom Alexander
|
||||||
|
signingkey = D3A179C9A53C0EDE
|
||||||
|
[push]
|
||||||
|
default = simple
|
||||||
|
[alias]
|
||||||
|
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
||||||
|
bh = log --oneline --branches=* --remotes=* --graph --decorate
|
||||||
|
[core]
|
||||||
|
excludesfile = /home/talexander/.gitignore_global
|
||||||
|
[commit]
|
||||||
|
gpgsign = true
|
||||||
|
[pull]
|
||||||
|
rebase = true
|
2
ansible/roles/base/files/gitignore_global
Normal file
2
ansible/roles/base/files/gitignore_global
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.idea
|
||||||
|
.python-version
|
0
ansible/roles/base/files/ignore
Normal file
0
ansible/roles/base/files/ignore
Normal file
8
ansible/roles/base/files/tmux.conf
Normal file
8
ansible/roles/base/files/tmux.conf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
set-option -g mouse on
|
||||||
|
set-option -g history-limit 20000
|
||||||
|
# set -g @plugin 'tmux-plugins/tmux-yank'
|
||||||
|
# Emacs style
|
||||||
|
# bind-key -T copy-mode y send-key -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b"
|
||||||
|
# bind-key -T copy-mode y send-key -X copy-pipe "xsel -i -p && xsel -o -p | xsel -i -b"
|
||||||
|
# bind-key C-y run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
|
||||||
|
# unbind -T copy-mode MouseDragEnd1Pane
|
@ -104,3 +104,22 @@
|
|||||||
src: tmpfs
|
src: tmpfs
|
||||||
fstype: tmpfs
|
fstype: tmpfs
|
||||||
opts: rw,mode=777
|
opts: rw,mode=777
|
||||||
|
|
||||||
|
- name: Set timezone
|
||||||
|
file:
|
||||||
|
src: "/usr/share/zoneinfo/{{ timezone|default('UTC') }}"
|
||||||
|
dest: /etc/localtime
|
||||||
|
owner: root
|
||||||
|
group: wheel
|
||||||
|
state: link
|
||||||
|
|
||||||
|
- name: Install scripts
|
||||||
|
copy:
|
||||||
|
src: "files/{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
mode: 0755
|
||||||
|
owner: root
|
||||||
|
group: wheel
|
||||||
|
loop:
|
||||||
|
- src: git_branches_by_owner_time
|
||||||
|
dest: /usr/local/bin/git_branches_by_owner_time
|
||||||
|
@ -1,6 +1,33 @@
|
|||||||
- include_role:
|
- include_role:
|
||||||
name: per_user
|
name: per_user
|
||||||
|
|
||||||
|
- name: Configure gitconfig
|
||||||
|
copy:
|
||||||
|
src: "files/{{ item.src }}"
|
||||||
|
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
|
||||||
|
mode: 0600
|
||||||
|
owner: "{{ account_name.stdout }}"
|
||||||
|
group: "{{ group_name.stdout }}"
|
||||||
|
when: gitconfig is defined
|
||||||
|
loop:
|
||||||
|
- src: "{{ gitconfig }}"
|
||||||
|
dest: .gitconfig
|
||||||
|
|
||||||
|
- name: Copy files
|
||||||
|
copy:
|
||||||
|
src: "files/{{ item.src }}"
|
||||||
|
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
|
||||||
|
mode: 0600
|
||||||
|
owner: "{{ account_name.stdout }}"
|
||||||
|
group: "{{ group_name.stdout }}"
|
||||||
|
loop:
|
||||||
|
- src: ignore
|
||||||
|
dest: .ignore
|
||||||
|
- src: tmux.conf
|
||||||
|
dest: .tmux.conf
|
||||||
|
- src: gitignore_global
|
||||||
|
dest: .gitignore_global
|
||||||
|
|
||||||
- import_tasks: tasks/peruser_freebsd.yaml
|
- import_tasks: tasks/peruser_freebsd.yaml
|
||||||
when: 'os_flavor == "freebsd"'
|
when: 'os_flavor == "freebsd"'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user