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
|
## Resources
|
||||||
|
|
||||||
* [GNU Readline Init File Syntax](http://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html)
|
* [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
|
- /etc/skel
|
||||||
- /root
|
- /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.
|
- name: Add root bashrc and vim configuration.
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /root/.bashrc
|
path: /root/.bashrc
|
||||||
@ -28,25 +35,25 @@
|
|||||||
line: "{{ item.line }}"
|
line: "{{ item.line }}"
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- regexp: '^(export )?EDITOR='
|
|
||||||
line: 'export EDITOR=vim.basic'
|
|
||||||
- regexp: '^(export )?VISUAL='
|
- regexp: '^(export )?VISUAL='
|
||||||
line: 'export VISUAL=vim.basic'
|
line: 'export VISUAL=vim.basic'
|
||||||
- regexp: '^(export )?HISTCONTROL='
|
- regexp: '^(export )?EDITOR='
|
||||||
line: 'HISTCONTROL=ignoreboth'
|
line: 'export EDITOR=vim.basic'
|
||||||
when: ansible_os_family != 'RedHat'
|
- 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:
|
lineinfile:
|
||||||
path: /root/.bashrc
|
path: /root/.bashrc
|
||||||
regexp: "{{ item.regexp }}"
|
regexp: "{{ item.regexp }}"
|
||||||
line: "{{ item.line }}"
|
line: "{{ item.line }}"
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- regexp: '^(export )?EDITOR='
|
|
||||||
line: 'export EDITOR=vim'
|
|
||||||
- regexp: '^(export )?VISUAL='
|
- regexp: '^(export )?VISUAL='
|
||||||
line: 'export VISUAL=vim'
|
line: 'export VISUAL=vim'
|
||||||
- regexp: '^(export )?HISTCONTROL='
|
- regexp: '^(export )?EDITOR='
|
||||||
line: 'HISTCONTROL=ignoreboth'
|
line: 'export EDITOR=vim'
|
||||||
|
- regexp: '^(export )?SUDO_EDITOR='
|
||||||
|
line: 'export SUDO_EDITOR=vim'
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
Loading…
Reference in New Issue
Block a user