1
0
Fork 0
Find a file
2025-12-10 00:59:47 +01:00
defaults Init dotfiles role 2024-11-03 18:22:20 +01:00
meta Init dotfiles role 2024-11-03 18:22:20 +01:00
tasks Update local Git config 2025-11-10 20:35:17 +01:00
.ansible-lint Init dotfiles role 2024-11-03 18:22:20 +01:00
LICENSE Init dotfiles role 2024-11-03 18:22:20 +01:00
README.md Multi-user playbook example 2025-12-10 00:59:47 +01:00

Ansible Role: Dotfiles

Install dotfiles @ https://github.com/Djuuu/dotfiles

Role Variables

Available role variables are listed below, along with default values (see defaults/main.yml):

dotfiles_repo: "{{ dotfiles_clone_use_ssh | ternary(dotfiles_repo_ssh, dotfiles_repo_https) }}"

dotfiles_repo_https:    https://github.com/Djuuu/dotfiles.git
dotfiles_repo_ssh:          git@github.com:Djuuu/dotfiles.git

dotfiles_clone_use_ssh: false

dotfiles_repo_version: master

dotfiles_repo_local_destination: ~/.dotfiles

dotfiles_force_reset: false

dotfiles_backup: false

dotfiles_install_command:  "{{ dotfiles_repo_local_destination }}/install"

dotfiles_gitconfig: []
  #- { option: 'name',  value: me }
  #- { option: 'email', value: me@example.net }

Dependencies

None.

Example Playbook

- hosts: all
  roles:
    - djuuu.dotfiles

Example for multiple users:

- hosts: all

  vars:
    dotfiles_users:
      - example
      - root

  tasks:
    - name: Install dotfiles
      loop: "{{ dotfiles_users | default([ansible_user]) }}"
      loop_control:
        loop_var: dotfiles_user
      vars:
        ansible_become: "{{ dotfiles_user != 'ansible_user' }}"
        ansible_become_user: "{{ dotfiles_user }}"
      ansible.builtin.include_role:
        name: djuuu.dotfiles

License

Beerware License