requirements.yml
:
collections:
- name: charlesrocket.essential
git
on managed machines
- name: Playbook
hosts: all
roles:
- charlesrocket.essential.dotfiles
dotfiles_repo: "https://github.com/charlesrocket/dotfiles.git" # dotfiles
dotfiles_repo_version: openbsd # branch to track
dotfiles_repo_accept_newhostkey: false # StrictHostKeyChecking=accept-new
dotfiles_repo_force: false # force git clone
dotfiles_repo_local_destination: "~/git/dotfiles" # local repo path
dotfiles_home: "~" # local dotfiles path
dotfiles_files: # files to track
- .config/mc/ini
- .zshrc
- name: Playbook
hosts: all
roles:
- charlesrocket.essential.git
Define the following variables to deploy the credential helper:
git_repo_destination: "~/gitlab/git" # git repository destination
git_helper_directory: "~/bin" # helper directory
git_helper: ["netrc"]
- Add
git_repo_shallow: true
to use shallow clone. - Add
git_repo_force: true
to override local modifications.
Inject variables from remote hosts:
- name: Playbook
hosts: all
tasks:
- name: Import user variables
include_role:
name: charlesrocket.essential.fetch_vars
vars:
fetch_vars_url: https://www.example.com/user_vars.yaml