ansible-role-git icon indicating copy to clipboard operation
ansible-role-git copied to clipboard

install_from_source causes repeated builds when prefix is not the default

Open rkm opened this issue 5 years ago • 23 comments

Hi, I'm using your playbook with the following vars:

git_version: 2.26.2
git_install_from_source: true
git_install_from_source_force_update: true
git_install_path: "/opt"

It looks as if the custom install prefix is causing the version check to fail on repeated runs.

I can probably submit a patch over the weekend if you like?

rkm avatar Apr 23 '20 22:04 rkm

Hi, i am using this and it fails but not on a repeated run. ( ansible-role.git version: 2.1.0 on redhat) I get this error msg: No package matching 'subversion-perl' found available, installed or updated when i use these vars:

- { role: geerlingguy.git, git_version: '2.21.0', git_install_from_source: true, git_install_from_source_force_update: true }

what's the fix?

viresh-contino avatar Apr 25 '20 16:04 viresh-contino

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] avatar Jul 24 '20 17:07 stale[bot]

I think I've fixed the original issue here. Should I open a PR?

Not sure about your problem @viresh-contino, sorry!

rkm avatar Jul 24 '20 19:07 rkm

This issue is no longer marked for closure.

stale[bot] avatar Jul 24 '20 19:07 stale[bot]

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] avatar Oct 22 '20 20:10 stale[bot]

boop

rkm avatar Oct 22 '20 21:10 rkm

This issue is no longer marked for closure.

stale[bot] avatar Oct 22 '20 21:10 stale[bot]

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] avatar Jan 21 '21 00:01 stale[bot]

Here's an easy repro for the issue:

$ tail -n +1 Dockerfile playbook.yml vars/main.yml
==> Dockerfile <==
FROM centos:8

RUN : \
    && dnf -q -y update \
    && dnf -q -y install epel-release \
    && dnf -q -y install ansible git \
    && :

RUN mkdir /tmp/t
COPY playbook.yml /tmp/t/
COPY vars /tmp/t/vars

RUN : \
    && cd /tmp/t \
    && ansible-galaxy install geerlingguy.git --force \
    # && ansible-galaxy install git+https://github.com/rkm/ansible-role-git \
    && ansible-playbook playbook.yml \
    && ansible-playbook playbook.yml \
    && :

==> playbook.yml <==
- hosts: localhost
  become: true
  tasks:
    - name: Include vars
      include_vars: vars/main.yml
    - name: Run geerlingguy.git
      include_role:
        name: geerlingguy.git
        # name: ansible-role-git

==> vars/main.yml <==
git_version: 2.30.0
git_install_from_source: true
git_install_from_source_force_update: true
git_install_path: "/opt"

Building the Dockerfile results in git being built twice, since the version built in the initial run is not detected.

I believe the patch I suggested in #52 addresses this, which can be tested by switching the comments in the above Dockerfile and playbook.

rkm avatar Jan 21 '21 08:01 rkm

This issue is no longer marked for closure.

stale[bot] avatar Jan 21 '21 08:01 stale[bot]

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] avatar Apr 23 '21 04:04 stale[bot]

boop

rkm avatar May 06 '21 16:05 rkm

This issue is no longer marked for closure.

stale[bot] avatar May 06 '21 16:05 stale[bot]

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] avatar Aug 04 '21 16:08 stale[bot]

ping

rkm avatar Aug 04 '21 17:08 rkm

This issue is no longer marked for closure.

stale[bot] avatar Aug 04 '21 17:08 stale[bot]

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] avatar Nov 02 '21 19:11 stale[bot]

boop

rkm avatar Nov 02 '21 20:11 rkm

This issue is no longer marked for closure.

stale[bot] avatar Nov 02 '21 20:11 stale[bot]

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] avatar Feb 05 '22 22:02 stale[bot]

boop

rkm avatar Feb 06 '22 14:02 rkm

This issue is no longer marked for closure.

stale[bot] avatar Feb 06 '22 14:02 stale[bot]

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] avatar Jun 12 '22 13:06 stale[bot]

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

stale[bot] avatar Sep 19 '22 23:09 stale[bot]