-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
43 lines (40 loc) · 1.26 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
- hosts: localhost
vars:
source_key: "./.ssh/id_rsa"
dest_key: "{{ lookup('env', 'HOME') }}/.ssh/id_rsa"
pre_tasks:
- name: Grant access to pacman and yay to do whatever without root access
ansible.builtin.shell:
cmd: 'echo "$USER ALL=(ALL) NOPASSWD:/usr/bin/yay,/usr/bin/pacman" > /tmp/110-grant-pacman-yay'
tags:
- install
- name: Copy access file
become: true
ansible.builtin.copy:
src: '/tmp/110-grant-pacman-yay'
dest: '/etc/sudoers.d/110-grant-pacman-yay'
tags:
- install
post_tasks:
- name: "Revoke access of pacman and yay"
become: true
ansible.builtin.file:
path: /etc/sudoers.d/11-grant-pacman-yay
state: absent
tags:
- install
tasks:
- import_tasks: ansible/keys.yml
- import_tasks: ansible/bar.yml
- import_tasks: ansible/editor.yml
- import_tasks: ansible/fonts.yml
- import_tasks: ansible/golang.yml
- import_tasks: ansible/javascript.yml
- import_tasks: ansible/login.yml
- import_tasks: ansible/rofi.yml
- import_tasks: ansible/services.yml
- import_tasks: ansible/tui.yml
- import_tasks: ansible/utilities.yml
- import_tasks: ansible/wm.yml
- import_tasks: ansible/scripts.yml
- import_tasks: ansible/config.yml