Broke tasks out into roles rather than leaving them all in common
This commit is contained in:
20
README.md
20
README.md
@@ -1,2 +1,20 @@
|
||||
# ansible-fedora
|
||||
Ansible scripts for installing and configuring my system
|
||||
|
||||
To clone repo:
|
||||
|
||||
sudo dnf install -y git
|
||||
git clone git@github.com:phrequency-navigator/ansible-fedora.git
|
||||
|
||||
To install dependancies:
|
||||
|
||||
cd ansible-fedora
|
||||
chmod u+x setup.sh
|
||||
./setup.sh
|
||||
|
||||
Edit the "all" file in ./ansible-fedora/group_vars to customize the setup
|
||||
|
||||
|
||||
Run the playbook
|
||||
|
||||
cd fedora-ansible
|
||||
ansible-playbook -i hosts --become --ask-become-pass common.yml
|
||||
@@ -1,7 +1,11 @@
|
||||
---
|
||||
- name: Common program installation
|
||||
hosts: localhost
|
||||
remote_user: elia
|
||||
hosts: all
|
||||
become: yes
|
||||
roles:
|
||||
- common
|
||||
- rpmfusion
|
||||
- dnf
|
||||
- codecs
|
||||
- flatpak
|
||||
|
||||
|
||||
29
group_vars/all
Normal file
29
group_vars/all
Normal file
@@ -0,0 +1,29 @@
|
||||
release_ver: "41"
|
||||
core_ver: "fc41"
|
||||
|
||||
username: "" #MY SUDO USER HERE
|
||||
|
||||
dnf_packages:
|
||||
- rhythmbox
|
||||
- terminator
|
||||
- git
|
||||
- neovim
|
||||
- ranger
|
||||
- htop
|
||||
- screen
|
||||
- tmux
|
||||
- flatpak
|
||||
- util-linux-user
|
||||
- curl
|
||||
- zsh
|
||||
|
||||
flatpak_remotes:
|
||||
- { name: "flathub", url: "https://dl.flathub.org/repo/flathub.flatpakrepo"}
|
||||
|
||||
flatpaks:
|
||||
- { remote: "flathub", package: "com.discordapp.Discord" }
|
||||
- { remote: "flathub", package: "com.github.tchx84.Flatseal" }
|
||||
- { remote: "flathub", package: "com.valvesoftware.Steam" }
|
||||
- { remote: "flathub", package: "org.mozilla.firefox" }
|
||||
- { remote: "flathub", package: "io.github.ungoogled_software.ungoogled_chromium" }
|
||||
- { remote: "flathub", package: "org.videolan.VLC" }
|
||||
24
roles/codecs/tasks/main.yml
Normal file
24
roles/codecs/tasks/main.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
- name: DNF Swap ffmpeg
|
||||
ansible.builtin.command: dnf swap ffmpeg-free ffmpeg --allowerasing
|
||||
become: yes
|
||||
become_user: root
|
||||
become_method: sudo
|
||||
|
||||
- name: install additional codecs
|
||||
ansible.builtin.command: dnf update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin
|
||||
become: yes
|
||||
become_user: root
|
||||
become_method: sudo
|
||||
|
||||
- name: DNF Swap mesa-va-drivers
|
||||
ansible.builtin.command: dnf swap mesa-va-drivers mesa-va-drivers-freeworld
|
||||
become: yes
|
||||
become_user: root
|
||||
become_method: sudo
|
||||
|
||||
|
||||
- name: DNF Swap mesa-vdpau-drivers
|
||||
ansible.builtin.command: dnf swap mesa-vdpau-drivers mesa-vdpau-drivers-freeworld
|
||||
become: yes
|
||||
become_user: root
|
||||
become_method: sudo
|
||||
@@ -3,44 +3,4 @@
|
||||
ansible.builtin.dnf:
|
||||
name: "*"
|
||||
state: latest
|
||||
update_cache: yes
|
||||
|
||||
- name: Install common programs
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- terminator
|
||||
- git
|
||||
- neovim
|
||||
- ranger
|
||||
- podman
|
||||
- htop
|
||||
- ansible
|
||||
- nmap
|
||||
- nmap-ncat
|
||||
- screen
|
||||
- chromium
|
||||
- clementine
|
||||
- john
|
||||
- hashcat
|
||||
- flatpak
|
||||
- util-linux-user
|
||||
- curl
|
||||
- zsh
|
||||
state: present
|
||||
|
||||
- name: Install Steam
|
||||
ansible.builtin.dnf:
|
||||
name: steam
|
||||
state: latest
|
||||
update_cache: yes
|
||||
|
||||
- name: Add flathub source
|
||||
community.general.flatpak_remote:
|
||||
name: flathub
|
||||
flatpakrepo_url: https://flathub.org/repo/flathub.flatpakrepo
|
||||
state: present
|
||||
|
||||
- name: Install Flatpaks
|
||||
community.general.flatpak:
|
||||
name: com.discordapp.Discord
|
||||
state: present
|
||||
update_cache: yes
|
||||
11
roles/dnf/tasks/main.yml
Normal file
11
roles/dnf/tasks/main.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
- name: Update installed packages
|
||||
ansible.builtin.dnf:
|
||||
name: "*"
|
||||
state: latest
|
||||
update_cache: yes
|
||||
|
||||
- name: Install Packages
|
||||
ansible.builtin.dnf:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
loop: "{{ dnf_packages }}"
|
||||
7
roles/flatpak/tasks/main.yml
Normal file
7
roles/flatpak/tasks/main.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
- name: install flatpak remotes
|
||||
community.general.flatpak_remote:
|
||||
name: "{{ item.name }}"
|
||||
state: present
|
||||
method: system
|
||||
flatpakrepo_url: "{{ item.url }}"
|
||||
loop: "{{ flatpak_remotes }}"
|
||||
12
roles/rpmfusion/tasks/main.yml
Normal file
12
roles/rpmfusion/tasks/main.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
- name: Install RPMFusion
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ release_ver }}.noarch.rpm
|
||||
- https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ release_ver }}.noarch.rpm
|
||||
state: present
|
||||
|
||||
- name: DNF Update
|
||||
ansible.builtin.dnf:
|
||||
name: "*"
|
||||
state: latest
|
||||
update_cache: yes
|
||||
Reference in New Issue
Block a user