Files
community.general/tests/integration/targets/cargo/tasks/setup.yml
patchback[bot] fa9ac2b3a9 [PR #11719/66886d08 backport][stable-12] integration tests: remove CentOS conditionals - part 2 (#11730)
integration tests: remove CentOS conditionals - part 2 (#11719)

* test(integration): remove CentOS references - part 2

* adjustments from review

(cherry picked from commit 66886d08f5)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2026-04-03 12:34:15 +00:00

39 lines
1.1 KiB
YAML

---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- block:
- name: Install cargo
package:
name: cargo
state: present
- set_fact:
has_cargo: true
when:
- ansible_facts.system != 'FreeBSD'
- ansible_facts.distribution != 'MacOSX'
- ansible_facts.distribution != 'Ubuntu' or ansible_facts.distribution_version is version('18', '>=')
- block:
- name: Install rust (containing cargo)
package:
name: rust
state: present
- set_fact:
has_cargo: true
when:
- ansible_facts.system == 'FreeBSD' and ansible_facts.distribution_version is version('13.0', '>')
- block:
- name: Download rustup
get_url:
url: https://sh.rustup.rs
dest: /tmp/sh.rustup.rs
mode: "0750"
force: true
- name: Install rustup cargo
command: /tmp/sh.rustup.rs -y
- set_fact:
rustup_cargo_bin: "{{ lookup('env', 'HOME') }}/.cargo/bin/cargo"