-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathredhat.yml
68 lines (60 loc) · 1.41 KB
/
redhat.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
- name: Install utilities
dnf:
name:
- automake
- gcc-c++
- clang
- llvm
- ccache
- glibc-devel.i686
- libcap-devel
- bpftool
- git
- make
- cmake
- wget
- kernel-devel
- libbpf-devel
- elfutils-libelf-devel
- perl
- NetworkManager-initscripts-ifcfg-rh
state: latest
- name: Update system
dnf:
name: "*"
state: latest
- name: which ccache
ansible.builtin.command: which ccache
register: ccache_path
- name: Create local bin directory
ansible.builtin.file:
path: /home/vagrant/.local/bin
state: directory
owner: vagrant
group: vagrant
- name: gcc-ccache symlink
ansible.builtin.file:
src: "{{ ccache_path.stdout }}"
dest: /home/vagrant/.local/bin/gcc
owner: vagrant
group: vagrant
state: link
- name: g++-ccache symlink
ansible.builtin.file:
src: "{{ ccache_path.stdout }}"
dest: /home/vagrant/.local/bin/g++
owner: vagrant
group: vagrant
state: link
- name: Add $HOME/.local/bin to $PATH
ansible.builtin.lineinfile:
path: /home/vagrant/.bash_profile
line: PATH="/home/vagrant/.local/bin:$PATH"
- name: Don't use ccache by default
ansible.builtin.lineinfile:
path: /home/vagrant/.bash_profile
line: export CCACHE_DISABLE=true
- name: Use vi as editor
lineinfile:
dest: /home/vagrant/.bash_profile
line: export EDITOR=vi