diff --git a/ansible/roles/git_lfs/README.md b/ansible/roles/git_lfs/README.md index 6ef8d03d917..a6b8da6e0a4 100644 --- a/ansible/roles/git_lfs/README.md +++ b/ansible/roles/git_lfs/README.md @@ -9,5 +9,6 @@ None. ## Manual Installation ```bash +sudo apt install git-lfs git lfs install ``` diff --git a/ansible/roles/git_lfs/tasks/main.yaml b/ansible/roles/git_lfs/tasks/main.yaml index 9255c3bd268..fa1700913d1 100644 --- a/ansible/roles/git_lfs/tasks/main.yaml +++ b/ansible/roles/git_lfs/tasks/main.yaml @@ -1,19 +1,18 @@ # https://github.com/git-lfs/git-lfs/wiki/Installation#debian-and-ubuntu -- name: Download script - ansible.builtin.get_url: - url: https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh - dest: /tmp/script.sh - mode: 0764 - -- name: Setup - become: true - environment: - os: "{{ ansible_distribution }}" - dist: "{{ ansible_distribution_release }}" - ansible.builtin.script: /tmp/script.sh - - name: Install Git LFS become: true ansible.builtin.apt: - name: - - git-lfs + name: git-lfs + state: latest + update_cache: true + +# ref: https://github.com/ansible/ansible-lint/issues/1780 +- name: Check if git lfs is installed # https://github.com/git-lfs/git-lfs/issues/901 + git_config: + list_all: true + scope: global + register: git_global_config + +- name: Setup Git LFS + command: git lfs install + when: "'filter.lfs.required' not in git_global_config.config_values"