mcgrof.devconfig

devconfig

devconfig角色允许您在目标系统上自定义您的 shell 环境,设置您典型的用户偏好。例如,如果您有一个/.gitconfig文件,它会将其复制到您运行ansible的每个目标系统。同样,如果您有一组您习惯的bash技巧,您可以将它们放入您的文件/.enhance-bash,devconfig将确保每个目标系统在默认用户和root的.bashrc文件中引用这个文件。

所有这些都是可选的。只有当文件存在时,复制和修改才会发生。

要求

无。

角色变量

  • data_home_dir: 每个主机上的目标主目录,默认为/home/vagrant
  • dev_gitconfig_src: 您本地的.gitconfig文件
  • dev_gitconfig_dest: 在目标系统上复制.gitconfig的位置
  • dev_bash_config: 使用的.bashrc文件
  • dev_bash_config_root: root的.bashrc文件
  • dev_bash_config_hacks_name: 您的bash技巧文件的名称,默认是"enhance-bash"
  • dev_bash_config_hacks_src: 如果上面的值为"enhance-bash",那么这是~/.enhance-bash
  • dev_bash_config_hacks_generic: 上面文件的通用名称
  • dev_bash_config_hacks_dest: 在目标系统上复制文件的位置
  • dev_bash_config_hacks_root: 为root复制技巧文件的位置
  • devconfig_try_refresh_repos: 是否尝试更新您的仓库?
  • devconfig_try_upgrade: 我们是否尝试更新您的系统?
  • devconfig_try_install_kdevtools: 我们是否安装一些内核黑客工具?
  • devconfig_repos_addon: 设置为true以启用附加仓库
  • devconfig_repos_addon_list: 要使用的仓库列表

您还可以选择使用debian.yml、suse.yml或redhat.yml。下面是特定于发行版的变量。其中一些可以是特定于发行版,并放入可选的用户secret.yml文件中。

  • suse_register_system: 如果设置为true,我们会尝试注册您的系统
  • suse_registration_code: 使用的注册代码

依赖项

无。

示例Playbook

下面是一个示例playbook任务:

---
- hosts: all
  roles:
    - role: devconfig

有关更多示例,请参考该角色的用户之一, https://github.com/mcgrof/kdevops项目或 https://github.com/mcgrof/oscheck项目,代码最初来自这里。

许可证

GPLv2

关于项目

Configure target hosts with your preferred development hacks

安装
ansible-galaxy install mcgrof.devconfig
许可证
other
下载
294
拥有者
https://www.do-not-panic.com/p/hacking.html