buluma.dotfiles

Ansible 角色 dotfiles

用于 UNIX/Linux 的点文件安装。

GitHub 版本 问题 拉取请求 下载量
github Version Issues PullRequests Ansible Role

示例剧本

这个示例来自 molecule/default/converge.yml,每次推送、拉取请求和发布时都会进行测试。

---
- name: Converge
  hosts: all
  become: true

  pre_tasks:
    - name: 更新 apt 缓存
      apt: update_cache=true cache_valid_time=600
      when: ansible_os_family == 'Debian'

  roles:
    - role: buluma.git
    - role: buluma.dotfiles

机器需要准备好。在 CI 中,这通过 molecule/default/prepare.yml 完成:

---
- name: Prepare
  hosts: all
  gather_facts: false
  become: true

  tasks:
    - name: 更新软件包缓存 (apt/Ubuntu)
      tags: always
      apt:
        update_cache: yes
      changed_when: false
      when: ansible_distribution == "Ubuntu"

    - name: 更新软件包缓存 (dnf/CentOS)
      tags: always
      dnf:
        update_cache: yes
      changed_when: false
      when: ansible_distribution == "CentOS"

    - name: 更新软件包缓存 (yum/Amazon)
      tags: always
      yum:
        update_cache: yes
      changed_when: false
      when: ansible_distribution == "Amazon"

  roles:
    - role: buluma.bootstrap
    # - role: buluma.git

另外,您可以查看 完整说明和示例 了解如何使用这些角色。

角色变量

变量的默认值在 defaults/main.yml 中设置:

---
dotfiles_repo: "https://github.com/buluma/dotfiles.git"
dotfiles_repo_version: master
dotfiles_repo_accept_hostkey: false
dotfiles_repo_local_destination: "~/Documents/dotfiles"

dotfiles_home: "~"
dotfiles_files:
  - .zshrc
  - .gitignore
  - .inputrc
  - .vimrc

需求

使用的角色状态

以下角色用于准备系统。您可以使用其他方式准备您的系统。

要求 GitHub 版本
buluma.bootstrap Ansible Molecule Version
buluma.git Ansible Molecule Version

上下文

该角色是许多兼容角色的一部分。有关更多信息,请查看 这些角色的文档

以下是相关角色的概述:

依赖关系

兼容性

此角色已在以下 容器镜像 上进行了测试:

容器 标签
Ubuntu all
Fedora all
Debian all
Amazon all
Alpine all

需要的最小 Ansible 版本为 2.2,已对以下版本进行测试:

  • 前一个版本
  • 当前版本
  • 开发版本

如果您发现问题,请在 GitHub 上注册。

更新日志

角色历史

许可证

Apache-2.0

作者信息

Shadow Walker

关于项目

Dotfile installation for UNIX/Linux.

安装
ansible-galaxy install buluma.dotfiles
许可证
apache-2.0
下载
6.4k
拥有者
DevOps Engineer