Using Ansible with Archiva

20 views
Skip to first unread message

g.ro...@prometheuscomputing.com

unread,
Jan 11, 2017, 10:19:17 AM1/11/17
to Ansible Project
I am new to Ansible and am trying to get a download from an Archiva respository.  I am using the extra called maven_artifact.  I can successfully download an artifact from Maven Central but not from my local Archiva.  By all accounts, Archiva is working properly.  It could be something as simple as me not getting the URL right when using Archiva, but I can't tell.  The URL Ansible assembles does not appear to be anything Archiva would understand, according to the Archiva REST API.

Is this supposed to work at all? If so, how?

Thanks in advance

This works:

---
- hosts: localhost
  connection
: local
  tasks
:
 
- name: Get federation artifact
    maven_artifact
:
     group_id
: junit
     artifact_id
: junit
     version
: 4.11
     repository_url
: 'http://repo1.maven.org/maven2'
     dest
: ./junit.jar
...

This does not work:

---
- hosts: localhost
  connection
: local
  tasks
:
 
- name: Get federation artifact
    maven_artifact
:      
      group_id
: org.webgme.guest
      artifact_id
: WeatherFederateProject-java
      version
: LATEST
      repository_url
: 'http://cpswtng_archiva:8080'
      dest
: ./WeatherFederateProject.jar
...

 

g.ro...@prometheuscomputing.com

unread,
Jan 12, 2017, 7:45:41 AM1/12/17
to Ansible Project
I answered my own question.  The following worked.  As I suspected, the URL was wrong.  btw,  Nothing in the Archiva REST API will do here.     
 
---
- hosts: localhost
  connection
: local
  tasks
:
 
- name: Get federation artifact
    maven_artifact
:      
      group_id
: org.webgme.guest
      artifact_id
: WeatherFederateProject-java
      version
:
LATEST
      repository_url
: 'http://cpswtng_archiva:8080/repository/snapshots'
      dest
: ./WeatherFederateProject.jar
...


Reply all
Reply to author
Forward
0 new messages