Arch didn't need env vars for root bashrc. Add sudo editor for work.
This commit is contained in:
parent
1e7e35b3b0
commit
358012ca19
@ -25,3 +25,8 @@ None.
|
||||
## Resources
|
||||
|
||||
* [GNU Readline Init File Syntax](http://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html)
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
* current vim runtime path with `:set runtimepath?`
|
||||
* Check vim `:version`
|
||||
|
@ -21,6 +21,13 @@
|
||||
- /etc/skel
|
||||
- /root
|
||||
|
||||
- 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.
|
||||
lineinfile:
|
||||
path: /root/.bashrc
|
||||
@ -28,25 +35,25 @@
|
||||
line: "{{ item.line }}"
|
||||
state: present
|
||||
with_items:
|
||||
- regexp: '^(export )?EDITOR='
|
||||
line: 'export EDITOR=vim.basic'
|
||||
- regexp: '^(export )?VISUAL='
|
||||
line: 'export VISUAL=vim.basic'
|
||||
- regexp: '^(export )?HISTCONTROL='
|
||||
line: 'HISTCONTROL=ignoreboth'
|
||||
when: ansible_os_family != 'RedHat'
|
||||
- regexp: '^(export )?EDITOR='
|
||||
line: 'export EDITOR=vim.basic'
|
||||
- regexp: '^(export )?SUDO_EDITOR='
|
||||
line: 'export SUDO_EDITOR=vim.basic'
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Add root bashrc and vim configuration for RedHat 7.9.
|
||||
- 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 )?EDITOR='
|
||||
line: 'export EDITOR=vim'
|
||||
- regexp: '^(export )?VISUAL='
|
||||
line: 'export VISUAL=vim'
|
||||
- regexp: '^(export )?HISTCONTROL='
|
||||
line: 'HISTCONTROL=ignoreboth'
|
||||
- regexp: '^(export )?EDITOR='
|
||||
line: 'export EDITOR=vim'
|
||||
- regexp: '^(export )?SUDO_EDITOR='
|
||||
line: 'export SUDO_EDITOR=vim'
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
Loading…
Reference in New Issue
Block a user