2023-07-05 18:02:56 +00:00
|
|
|
---
|
|
|
|
- import_tasks: vim-Debian.yml
|
|
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
|
|
|
|
- import_tasks: vim.yml
|
|
|
|
when: ansible_os_family != 'Debian'
|
|
|
|
|
|
|
|
- name: Copy bash aliases
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: bash_aliases
|
|
|
|
dest: "{{ item }}/.bash_aliases"
|
|
|
|
loop:
|
|
|
|
- /etc/skel
|
|
|
|
- /root
|
|
|
|
|
|
|
|
- name: Copy shell configuration
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: inputrc
|
|
|
|
dest: "{{ item }}/.inputrc"
|
|
|
|
loop:
|
|
|
|
- /etc/skel
|
|
|
|
- /root
|
|
|
|
|
2023-07-05 19:06:57 +00:00
|
|
|
- name: Add root bashrc shell history configuration
|
|
|
|
lineinfile:
|
|
|
|
path: /root/.bashrc
|
|
|
|
regexp: '^(export )?HISTCONTROL='
|
|
|
|
line: 'HISTCONTROL=ignoreboth'
|
|
|
|
state: present
|
|
|
|
|
2023-07-05 18:02:56 +00:00
|
|
|
- name: Add root bashrc and vim configuration.
|
|
|
|
lineinfile:
|
|
|
|
path: /root/.bashrc
|
|
|
|
regexp: "{{ item.regexp }}"
|
|
|
|
line: "{{ item.line }}"
|
|
|
|
state: present
|
|
|
|
with_items:
|
|
|
|
- regexp: '^(export )?VISUAL='
|
|
|
|
line: 'export VISUAL=vim.basic'
|
2023-07-05 19:06:57 +00:00
|
|
|
- regexp: '^(export )?EDITOR='
|
|
|
|
line: 'export EDITOR=vim.basic'
|
|
|
|
- regexp: '^(export )?SUDO_EDITOR='
|
|
|
|
line: 'export SUDO_EDITOR=vim.basic'
|
|
|
|
when: ansible_os_family == 'Debian'
|
2023-07-05 18:02:56 +00:00
|
|
|
|
2023-07-05 19:06:57 +00:00
|
|
|
- name: Add root bashrc and vim configuration for RedHat
|
2023-07-05 18:02:56 +00:00
|
|
|
lineinfile:
|
|
|
|
path: /root/.bashrc
|
|
|
|
regexp: "{{ item.regexp }}"
|
|
|
|
line: "{{ item.line }}"
|
|
|
|
state: present
|
|
|
|
with_items:
|
|
|
|
- regexp: '^(export )?VISUAL='
|
|
|
|
line: 'export VISUAL=vim'
|
2023-07-05 19:06:57 +00:00
|
|
|
- regexp: '^(export )?EDITOR='
|
|
|
|
line: 'export EDITOR=vim'
|
|
|
|
- regexp: '^(export )?SUDO_EDITOR='
|
|
|
|
line: 'export SUDO_EDITOR=vim'
|
2023-07-05 18:02:56 +00:00
|
|
|
when: ansible_os_family == 'RedHat'
|