Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/cargo/tasks/setup.yml

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 - block:
7 - name: Install cargo
8 package:
9 name: cargo
10 state: present
11 - set_fact:
12 has_cargo: true
13 when:
14 - ansible_facts.system != 'FreeBSD'
15 - ansible_facts.distribution != 'MacOSX'
16 - ansible_facts.distribution != 'Ubuntu' or ansible_facts.distribution_version is version('18', '>=')
17
18 - block:
19 - name: Install rust (containing cargo)
20 package:
21 name: rust
22 state: present
23 - set_fact:
24 has_cargo: true
25 when:
26 - ansible_facts.system == 'FreeBSD' and ansible_facts.distribution_version is version('13.0', '>')
27
28 - block:
29 - name: Download rustup
30 get_url:
31 url: https://sh.rustup.rs
32 dest: /tmp/sh.rustup.rs
33 mode: "0750"
34 force: true
35 - name: Install rustup cargo
36 command: /tmp/sh.rustup.rs -y
37 - set_fact:
38 rustup_cargo_bin: "{{ lookup('env', 'HOME') }}/.cargo/bin/cargo"