2023-11-08 18:15:51 +00:00
|
|
|
---
|
|
|
|
- import_tasks: vim.yml
|
|
|
|
|
2023-11-19 16:17:12 +00:00
|
|
|
- name: Copy the global vim configuration
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: vimrc.local
|
|
|
|
dest: /etc/
|
|
|
|
|
2023-11-08 18:15:51 +00:00
|
|
|
- name: Copy shell configuration
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: inputrc
|
2023-11-09 14:41:01 +00:00
|
|
|
dest: "{{ dotfile_path }}/.inputrc"
|
|
|
|
loop_control:
|
|
|
|
loop_var: dotfile_path
|
2023-11-08 18:15:51 +00:00
|
|
|
loop:
|
|
|
|
- /etc/skel
|
|
|
|
- /root
|
2023-11-09 14:41:01 +00:00
|
|
|
- "{{ ansible_env.PWD }}/"
|
2023-11-08 18:15:51 +00:00
|
|
|
|
2023-11-09 14:41:01 +00:00
|
|
|
- name: Install global bash aliases
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: bash_aliases
|
|
|
|
dest: /etc/profile.d/zz_aliases.sh
|
|
|
|
mode: '0755'
|
2023-11-08 18:15:51 +00:00
|
|
|
|
|
|
|
#- name: Add root bashrc shell history configuration
|
|
|
|
# lineinfile:
|
|
|
|
# path: /root/.bashrc
|
|
|
|
# regexp: '^(export )?HISTCONTROL='
|
|
|
|
# line: 'HISTCONTROL=ignoreboth'
|
|
|
|
# state: present
|
|
|
|
#
|
|
|
|
#- name: Add root bashrc and vim configuration for RedHat
|
|
|
|
# lineinfile:
|
|
|
|
# path: /root/.bashrc
|
|
|
|
# regexp: "{{ item.regexp }}"
|
|
|
|
# line: "{{ item.line }}"
|
|
|
|
# state: present
|
|
|
|
# with_items:
|
|
|
|
# - regexp: '^(export )?VISUAL='
|
|
|
|
# line: 'export VISUAL=vim'
|
|
|
|
# - regexp: '^(export )?EDITOR='
|
|
|
|
# line: 'export EDITOR=vim'
|
|
|
|
# - regexp: '^(export )?SUDO_EDITOR='
|
|
|
|
# line: 'export SUDO_EDITOR=vim'
|
|
|
|
#
|
|
|
|
#- name: Add functional alias to restart a service and show the log
|
|
|
|
# blockinfile:
|
|
|
|
# path: /root/.bashrc
|
|
|
|
# block: |
|
|
|
|
# pheonix() {
|
|
|
|
# systemctl restart $1;journalctl -fu $1
|
|
|
|
# }
|