ckaserer.bashrc

gplv3 维护

ckaserer.bashrc

如果你和我一样大部分时间在命令行界面(CLI)上工作,你可能想为生活增添一些色彩。使用这个自定义的bashrc,你将获得一个跨越两行的bash提示符,这样你可以一眼看到用户、主机、路径以及如果你在git仓库中则看到git分支。此外,lsgrep会有颜色显示,前提是你的系统支持。

git


nogit

让我们为你的bash带来色彩和git支持吧!

你可以通过两种方式使用bashrc角色。可以仅为ansible连接到目标节点的用户启用bashrc,或者将bashrc作为系统默认的设置。

无论哪种方式,我们需要从ansible galaxy安装最新版本的bashrc ansible角色:

ansible-galaxy install ckaserer.bashrc

用户

下面的剧本会下载最新的bashrc版本,并为你当前节点的当前用户启用它。

你也可以将hosts设置为一组ansible节点或all。这将为ansible用于连接目标节点的用户启用bashrc。

- hosts: localhost
  tasks:
    - name: "包含 ckaserer.bashrc"
      include_role:
        name: "ckaserer.bashrc"

系统默认设置

下面的剧本将在所有节点上下载最新的bashrc版本,并为所有用户启用它。

你也可以将hosts设置为一组ansible节点或localhost

执行系统默认设置需要root权限,因此在include_role任务中需要额外的become: true

- hosts: all
  tasks:
    - name: "包含 ckaserer.bashrc"
      include_role:
        name: "ckaserer.bashrc"
        apply:
          become: true
        vars:
          systemwide: true
关于项目

colorful and useful bashrc

安装
ansible-galaxy install ckaserer.bashrc
许可证
gpl-3.0
下载
482
拥有者
Anything related to Containers, CI/CD or general automation is fair game for him - give him a terminal and he is happy.