Skip to content

Commit 63c26c8

Browse files
committed
Merge pull request #1 from pedrocarmona/add-version-variable
Add version variable
2 parents 56aa3c5 + 06c5f29 commit 63c26c8

7 files changed

Lines changed: 18 additions & 33 deletions

File tree

.travis.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,21 @@ script:
2222
- "ansible-playbook -i tests/inventory tests/$SITE --syntax-check"
2323

2424
# Run the role/playbook with ansible-playbook.
25-
- "ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo"
25+
- "ansible-playbook -i tests/inventory tests/$SITE --connection=local"
2626

2727
# Run the role/playbook again, checking to make sure it's idempotent.
2828
- >
29-
ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo
30-
| grep -q 'changed=1.*failed=0'
29+
ansible-playbook -i tests/inventory tests/$SITE --connection=local
30+
| grep -q 'changed=0.*failed=0'
3131
&& (echo 'Idempotence test: pass' && exit 0)
3232
|| (echo 'Idempotence test: fail' && exit 1)
3333
34+
- >
35+
git lfs version | awk -F' ' '{print $1}' | awk -F'/' '{print $2}'
36+
| grep -q '1.1.0'
37+
&& (echo 'version test: pass' && exit 0)
38+
|| (echo 'version test: fail' && exit 1)
39+
3440
# Make sure git is installed and at the correct version.
3541
- which git-lfs
3642
- git lfs env

README.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,6 @@ Sponsored by [BidMath](http://bidmath.com/)
1919
```
2020
2121
22-
## Usage notes
23-
24-
Added the git_lfs_install_vars variable to defaults, in order to provide the ability to not download files in LFS when you clone the repo. Currently is faster to clone a repo and then use git lfs pull, because git lfs pull has better implementation on download:
25-
26-
```yaml
27-
28-
- hosts: servers
29-
roles:
30-
- { role: pedrocarmona.github-git-lfs }
31-
tasks:
32-
- git: >
33-
repo=git://foosball.example.org/path/to/repo.git
34-
dest=repodir/
35-
36-
- command: git lfs pull
37-
args:
38-
chdir: repodir/
39-
```
40-
41-
4222
## License
4323
4424
MIT / BSD

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
git_lfs_install_vars: --skip-smudge
2+
git_lfs_version: 1.1.0

tasks/debian.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
2020
- name: Ensure github git-lfs is installed (Debian)
2121
apt:
22-
name=git-lfs
23-
state=latest
22+
name=git-lfs={{ git_lfs_version }}
23+
state=present
2424
update_cache=yes

tasks/main.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,3 @@
44

55
- include: debian.yml
66
when: ansible_os_family == 'Debian'
7-
8-
- name: Git lfs install
9-
sudo: false
10-
command: git lfs install {{ git_lfs_install_vars }}

tasks/redhat.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
- name: Ensure github git-lfs is installed (RedHat)
1717
yum:
18-
name=git-lfs
19-
state=latest
18+
name=git-lfs-{{ git_lfs_version }}
19+
state=present
2020
update_cache=yes
2121
enablerepo=github_git-lfs

tests/test-install-package.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
- hosts: localhost
3-
remote_user: root
3+
sudo: true
4+
vars:
5+
user: deploy
6+
group: deploy
47
roles:
58
- github-git-lfs

0 commit comments

Comments
 (0)