@@ -1,5 +1,9 @@ | |||||
root_user_aliases: | |||||
root_ssh_key: false | |||||
root_shell_aliases: | |||||
- name: aptitude-list-manually-installed | - name: aptitude-list-manually-installed | ||||
description: list all manually installed packages without system packages | |||||
command: aptitude search '!?priority(required) !?priority(important) ?installed !?automatic' | command: aptitude search '!?priority(required) !?priority(important) ?installed !?automatic' | ||||
- name: apt-tail-log | - name: apt-tail-log | ||||
description: tail the apt log | |||||
command: tail -f /var/log/apt/term.log | command: tail -f /var/log/apt/term.log |
@@ -1,6 +1,39 @@ | |||||
--- | --- | ||||
- name: root bashrc | |||||
- name: fish package | |||||
package: | |||||
name: fish | |||||
- name: fish config directory | |||||
file: | |||||
path: /root/.config/fish/conf.d/ | |||||
state: directory | |||||
- name: fish config files | |||||
template: | template: | ||||
src: bashrc.j2 | |||||
dest: /root/.bashrc | |||||
src: "{{ item }}.fish.j2" | |||||
dest: /root/.config/fish/conf.d/{{ item }}.fish | |||||
with_items: | |||||
- root-shell-aliases | |||||
- name: fish shell | |||||
user: | |||||
name: root | |||||
shell: /usr/bin/fish | |||||
- name: ssh key | |||||
user: | |||||
name: root | |||||
generate_ssh_key: yes | |||||
ssh_key_type: ed25519 | |||||
when: root_ssh_key | |||||
- name: password | |||||
user: | |||||
name: root | |||||
password: "{{ root_password }}" | |||||
when: root_password is defined | |||||
- file: | |||||
path: /root/.config/fish/conf.d/title.fish | |||||
state: absent |
@@ -1,11 +0,0 @@ | |||||
# ~/.bashrc: executed by bash(1) for non-login shells. | |||||
{{ ansible_managed | comment }} | |||||
{% for alias in root_user_aliases %} | |||||
alias {{alias.name}}="{{alias.command}}" | |||||
{% endfor %} | |||||
HISTFILE=/root/.history | |||||
shopt -s histappend # append to history, don't overwrite it | |||||
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" |
@@ -0,0 +1,7 @@ | |||||
{{ ansible_managed | comment }} | |||||
{% for alias in root_shell_aliases %} | |||||
function {{ alias.name }} --description {{ alias.description | quote }} | |||||
{{alias.command}} $argv | |||||
end | |||||
{% endfor %} |