5b2f9bdef9
We need a role to fetch translation output to the executor for artifact upload. We also need to be able to specify a leading path when uploading artifacts as translations go into a top dir of translation-source. Change-Id: I014d559c330803213105ce1bf83a41a3c157df9c Signed-off-by: Jesse Keating <omgjlk@us.ibm.com>
28 lines
896 B
YAML
28 lines
896 B
YAML
- name: Create SSH private key tempfile
|
|
tempfile:
|
|
state: file
|
|
register: ssh_private_key_tmp
|
|
|
|
- name: Create SSH private key from secret
|
|
copy:
|
|
content: "{{ fileserver.ssh_private_key }}"
|
|
dest: "{{ ssh_private_key_tmp.path }}"
|
|
mode: 0600
|
|
|
|
- name: Add fileserver ssh key
|
|
command: "ssh-add {{ ssh_private_key_tmp.path }}"
|
|
|
|
- name: Remove SSH private key from disk
|
|
command: "shred {{ ssh_private_key_tmp.path }}"
|
|
|
|
- name: Add fileserver to inventory
|
|
add_host:
|
|
name: "{{ fileserver.fqdn }}"
|
|
ansible_user: "{{ fileserver.ssh_username|default(ansible_user) }}"
|
|
zuul_fileserver_project_path: "{{ fileserver.path }}{{ '/' + fileserver_leading_path if fileserver_leading_path is defined else ''}}/{{ zuul.project.short_name }}"
|
|
|
|
- name: Add fileserver server to known hosts
|
|
known_hosts:
|
|
name: "{{ fileserver.fqdn }}"
|
|
key: "{{ fileserver.ssh_known_hosts }}"
|