@installdoc/ansible-gas-station
Version:
An Ansible playbook that provisions your network with software from GitHub Awesome lists, developed with disaster recovery in mind ⛽🔥🤤
22 lines (20 loc) • 707 B
YAML
- name: "Ensure {{ app_name }} is installed"
community.general.pacman:
name: git-delta
state: "{{ app_state | default('present') }}"
update_cache: "{{ omit if skip_package_cache_update is defined else 'true' }}"
- name: "Ensure {{ app_name }} config is added to ~/.gitconfig"
become_user: "{{ user.username }}"
blockinfile:
path: ~/.gitconfig
marker: "# {mark} Ansible managed block for delta"
backup: true
create: true
mode: 0700
block: "{{ lookup('file', 'gitconfig') }}"
loop: "{{ user_configs }}"
loop_control:
label: "{{ user.username }}"
loop_var: user
when: (user.system is not defined) or ((user.system is defined) and (not user.system))