dwsr.profile_d

profile_d 构建状态

一个Ansible角色,用于通过类似Debian的.d目录管理当前用户的Bash或ZSH shell配置文件。

需求

控制节点

远程节点

角色默认设置

变量 类型 默认值 描述
profile_d_shell str "{{ ansible_user_shell }}" 要配置的shell。

依赖

示例剧本

- hosts: my-workstation
  roles:
    - profile_d

许可证

MPL-2.0

作者信息

此角色由Brandon McNama于2020年创建。

开发

开发要求

  • Ruby 2.7或更高版本
  • Python 3.8或更高版本
  • Poetry 1.1或更高版本

此仓库支持asdf进行语言选择。

安装

bundle install --path vendor/bundle --jobs 2 --clean && poetry install --remove-untracked

运行代码检查

poetry run pre-commit

运行测试

此角色使用Test KitchenInspec进行测试,而不是使用Molecule。这是为了更容易支持多种测试驱动程序(包括dockerexec),以便在多个操作系统上进行测试。

有两个测试套件:

  • default套件旨在针对使用bash作为默认shell的Linux主机进行测试。 此套件使用docker测试多个ubuntu变体。
  • zsh套件旨在针对使用zsh作为默认shell的MacOS进行测试。此套件 使用exec驱动程序在当前主机上执行命令,旨在在CI运行器主机上运行,例如GitHub Actions。

要运行测试,请运行bundle exec poetry run kitchen test <套件名称>

关于项目

Manages the shell profile of the current user using a Debian-like .d directory

安装
ansible-galaxy install dwsr.profile_d
许可证
mpl-2.0
下载
116
拥有者