-
Notifications
You must be signed in to change notification settings - Fork 0
/
ansible_fedora.yml
146 lines (146 loc) · 3.67 KB
/
ansible_fedora.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
- name: Setup fedora
hosts: 127.0.0.1
remote_user: root
tasks:
- name: update dnf
shell: sudo dnf -y update
- name: install dnf-plugins-core
shell: sudo dnf -y install dnf-plugins-core
- name: enable copr atim/lazygit
community.general.copr:
name: atim/lazygit
state: enabled
- name: add docker repository
shell: 'sudo dnf config-manager --add-repo "https://download.docker.com/linux/fedora/docker-ce.repo"'
- name: remove pre-installed docker
ansible.builtin.dnf:
name:
- docker
- docker-client
- docker-client-latest
- docker-common
- docker-latest
- docker-latest-logrotate
- docker-logrotate
- docker-selinux
- docker-engine-selinux
- docker-engine
state: absent
autoremove: true
- name: install cli tools
ansible.builtin.dnf:
name:
- ansible
- bison
- curl
- exa
- gcc
- git
- glibc-devel
- lazygit
- make
- neovim
- python
- python3
- python3-neovim
- python3-pip
- rbenv
- repo
- stow
- syncthing
- tmux
- vim
- zoxide
- zsh
- name: clone dotfiles
ansible.builtin.git:
repo: "https://github.com/alturino/dotfiles.git"
dest: ~/dotfiles/
- name: clone tpm
ansible.builtin.git:
repo: "https://github.com/alturino/dotfiles.git"
dest: $HOME/.tmux/plugins/tpm/
- name: uninstall default ruby
ansible.builtin.dnf:
name:
- ruby
state: absent
autoremove: true
- name: install ruby using rbenv
shell: eval "(rbenv init - bash)" && rbenv install 3.1.2 && rbenv global 3.1.2
- name: Download ohmyzsh installer
get_url:
url: https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
dest: /tmp/ohmyzsh.sh
mode: "0755"
force: "yes"
tags:
- ohmyzsh
- name: install ohmyzsh
shell: /tmp/ohmyzsh.sh -y
tags:
- ohmyzsh
- name: remove .bashrc before stowing
command: rm .bashrc
args:
chdir: ~/
tags:
- stow
- name: remove .zshrc before stowing
command: rm .zshrc
args:
chdir: ~/
tags:
- stow
- name: remove files in dotfiles dir before stowing
command: rm README.md LICENSE ansible_fedora.yml
args:
chdir: ~/dotfiles/
tags:
- stow
- name: stow dotfiles
shell: stow *
args:
chdir: ~/dotfiles/
tags:
- stow
- name: check if cargo is installed
shell: command -v cargo
register: cargo_exists
ignore_errors: yes
tags:
- rust
- name: Download Rust Installer
when: cargo_exists is failed
get_url:
url: https://sh.rustup.rs
dest: /tmp/sh.rustup.rs
mode: "0755"
force: "yes"
tags:
- rust
- name: install rust/cargo
when: cargo_exists is failed
shell: /tmp/sh.rustup.rs -y
tags:
- rust
- name: Download gvm
get_url:
url: https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer
dest: /tmp/gvm.sh
mode: "0755"
force: "yes"
tags:
- gvm
- name: install gvm
shell: /tmp/gvm.sh -y
tags:
- gvm
- name: install fnm
command: cargo install fnm
tags:
- fnm
- name: install nodejs with fnm
command: fnm install --lts
tags:
- fnm