Paul Belanger 5e1a7e7234 Create ansible-galaxy-import role
Ansible Galaxy has the ability for user to import roles into it. This
role will leverage the ansible-galaxy CLI command to do this.  We'll
login via a github token (sorry only method) then trigger an import on
the remote API server.

Change-Id: I959c3051403929ef4927cf23fdbef14b45294aa2
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-10-08 11:01:57 -04:00

7 lines
405 B
YAML

- name: Login into Ansible Galaxy
command: "{{ ansible_galaxy_executable }} -s {{ ansible_galaxy_server }} login --github-token {{ galaxy_info.token }}"
no_log: True
- name: Import role into Ansible Galaxy
command: "{{ ansible_galaxy_executable }} -s {{ ansible_galaxy_server }} import --branch {{ ansible_galaxy_branch }} {{ zuul.project['name'].split('/')[0] }} {{ zuul.project['short_name'] }}"