@installdoc/ansible-gas-station
Version:
An Ansible playbook that provisions your network with software from GitHub Awesome lists, developed with disaster recovery in mind ⛽🔥🤤
36 lines (31 loc) • 1.01 kB
YAML
- name: "Ensure {{ app_name }}'s dependencies are installed"
community.general.pacman:
name: "{{ wrk_dependencies }}"
state: "{{ app_state | default('present') }}"
update_cache: "{{ omit if skip_package_cache_update is defined else 'true' }}"
- name: "Ensure {{ app_name }}'s source directory is present"
file:
mode: 0755
path: "{{ wrk_src_dir }}"
owner: "{{ ansible_user | default(lookup('env', 'USER')) }}"
state: directory
- name: "Ensure {{ app_name }}'s source is cloned and up-to-date"
become: false
git:
dest: "{{ wrk_src_dir }}"
repo: "{{ wrk_aur_git_repository }}"
version: master
register: wrk_git
- name: Remove /usr/bin/wrk if the source files have changed # noqa 503
file:
path: /usr/bin/wrk
state: absent
when: wrk_git.changed
- name: "Ensure {{ app_name }} is installed" # noqa 503
become: false
command: makepkg -sic --noconfirm
args:
chdir: "{{ wrk_src_dir }}"
creates: /usr/bin/wrk
when: shdoc_git.changed