--- - name: Find the OS and architecture of the control node setup: gather_subset: '!all' - name: Find the latest version of go-swagger uri: url: https://api.github.com/repos/go-swagger/go-swagger/releases/latest register: latest_goswagger_version - debug: msg: 'Found go-swagger remotely, version {{ latest_goswagger_version.json.tag_name }}' - name: Create the folder to download go-swagger file: path: '{{ threescale_cicd_local_bin_path }}' state: directory - name: Download go-swagger get_url: url: '{{ goswagger_download_url }}' dest: '{{ threescale_cicd_local_bin_path }}/swagger' mode: 0755 vars: goswagger_download_url: '{{ goswagger_asset.browser_download_url }}' goswagger_asset: '{{ goswagger_assets|selectattr(''name'', ''equalto'', artifact_name)|first }}' goswagger_assets: '{{ latest_goswagger_version.json.assets }}' artifact_name: 'swagger_{{ ansible_system|lower }}_{{ swagger_architecture }}' swagger_architecture: '{{ swagger_architecture_mapping[ansible_architecture] }}' swagger_architecture_mapping: x86_64: amd64 armv7l: arm - set_fact: threescale_cicd_goswagger_command: '{{ threescale_cicd_local_bin_path }}/swagger'