Install ansible via pip, adjust PATH on Linux zsh

Prior to this, Homebrew paths came before system ones and overrode
access to system python on Linux. The DEB version of Ansible also has a
bug preventing collections from being installed from Galaxy.
This commit is contained in:
Gene Liverman 2022-06-27 09:38:46 -04:00
parent 3462e96c1e
commit 99d5e66a25
No known key found for this signature in database
GPG key ID: 3AF83985B6C857C6
2 changed files with 26 additions and 6 deletions

View file

@ -99,7 +99,6 @@
state: latest
pkg:
- 1password
- ansible-lint
- bat
- boinc-manager
- boinctui
@ -231,7 +230,10 @@
- name: Python packages via pip
ansible.builtin.pip:
state: latest
name:
- ansible
- ansible-lint
- flake8
- name: Install packages from Homebrew
@ -273,8 +275,21 @@
dest: "{{ lookup('env', 'HOME') }}/.zshrc"
state: link
- name: Set shell to zsh
- name: Set shell to zsh and add to groups
become: true
ansible.builtin.user:
name: "{{ lookup('env', 'USER') }}"
shell: /usr/bin/zsh
append: true
groups:
- dialout
- name: Add passwordless sudo entries
become: true
jonellis.sudoers.sudoers:
name: "{{ lookup('env', 'USER') }}-no-password"
user: "{{ lookup('env', 'USER') }}"
nopassword: true
command:
- /usr/bin/systemctl restart pcscd
- /usr/bin/pkill -9 gpg-agent