fix: use become for apt & dnf

This commit is contained in:
Price Hiller 2022-08-02 23:12:29 -05:00
parent b000c1d2b7
commit dc506d40a9
5 changed files with 12 additions and 1 deletions

View File

@ -6,12 +6,14 @@
when: ansible_facts.distribution == 'MacOSX'
- name: Install zsh for Debian based systems
become: true
ansible.builtin.apt:
name: zsh
state: present
when: ansible_facts.os_family == 'Debian'
- name: Install zsh for RedHat based systems
become: true
ansible.builtin.dnf:
name: zsh
state: present

View File

@ -5,6 +5,7 @@
when: ansible_facts.distribution == 'MacOSX'
- name: Install Golang for Debian based systems
become: true
ansible.builtin.apt:
name: golang-go
state: present
@ -17,6 +18,7 @@
when: ansible_facts.distribution == 'Archlinux'
- name: Install Golang for RedHat based systems
become: true
ansible.builtin.dnf:
name: go-toolset
state: present

View File

@ -18,6 +18,7 @@
- name: Install Node for Debian based systems
block:
- name: Ensure node deps are installed for Debian based systems
become: true
ansible.builtin.apt:
name:
- curl
@ -32,6 +33,7 @@
changed_when: true
- name: Install Node
become: true
ansible.builtin.apt:
name:
- nodejs
@ -41,6 +43,7 @@
- name: Install Node for RedHat based systems
block:
- name: Ensure node deps are installed for RedHat based systems
become: true
ansible.builtin.dnf:
name:
- curl
@ -54,6 +57,7 @@
changed_when: true
- name: Install Node for RedHat based systems
become: true
ansible.builtin.dnf:
name: nodejs
state: present
@ -63,4 +67,5 @@
community.general.homebrew:
name:
- node
state: present
when: ansible_facts.distribution == 'MacOSX'

View File

@ -1,11 +1,13 @@
---
- name: Install Ruby for Debian based Systems
become: true
ansible.builtin.apt:
name: ruby
state: present
when: ansible_facts.os_family == 'Debian'
- name: Install Ruby for RedHat based systems
become: true
ansible.builtin.dnf:
name:
- ruby

View File

@ -51,7 +51,7 @@
argv:
- "{{ rust_working_dir.path }}/sh.rustup.rs"
- -y
- --default-toolchain
- --default-toolchain
- "{{ rustup_toolchain | default('stable') }}"
changed_when: true
tags: