Add support for openSUSE (#35)
* Add openSUSE for initial testing. * Add package names for openSUSE Zypper. * Add commands for Zypper. Do apt clean after autoremove. * Add cronie to openSUSE. * Remove warn parameter for newer version of Ansible. * Commenting warn worked, removing it completely. * Add libvulkan1 since it's a dependency for GNOME. * Fix order of lynis and nmap. Thought I had already done this before? * Start adding package names for openSUSE. * Create the sshd_config file if it is not already present. * Fix OS in conditional. * Save the command for checking ansible variables. * Use openSUSE family since Tumbleweed and Leap are considered different distros. * Get rid of 2nd flathub repo, no longer use the dl. version.. * Add status update for openSUSE. * Reword sentence. * Add Brave Browser to openSUSE. * Script is running successfully now when Workstation is enabled. * Add status of openSUSE Leap. * Add space. * No longer use install-new-recommends.
This commit is contained in:
parent
50554dfcb4
commit
904dda6883
13
README.md
13
README.md
@ -28,6 +28,15 @@ This setup is specific to the maintainer's devices and needs. You're welcome to
|
|||||||
Workstation: 100%
|
Workstation: 100%
|
||||||
Server: 100%
|
Server: 100%
|
||||||
|
|
||||||
|
## Suse Family
|
||||||
|
### openSUSE Tumbleweed v2022-02-17
|
||||||
|
Generic: 100%
|
||||||
|
Workstation: 100%
|
||||||
|
|
||||||
|
### openSUSE Leap 15.4
|
||||||
|
Generic: 100%
|
||||||
|
Workstation: Currently failing at `[Workstation | Linux | Flatpak Distro | Package Manager | Install From Repo]` with message `Problem: nothing provides libedataserver-1.2.so.24 needed by the to be installed evolution-data-server-32bit-3.34.4-3.3.1.x86_64`.
|
||||||
|
|
||||||
## Currently Supported Unix Systems
|
## Currently Supported Unix Systems
|
||||||
### FreeBSD 12, 13
|
### FreeBSD 12, 13
|
||||||
100%, although GUI is not working completely on 13 yet (dash-to-dock doesn't compile).
|
100%, although GUI is not working completely on 13 yet (dash-to-dock doesn't compile).
|
||||||
@ -46,3 +55,7 @@ Specifically for the Pinephone.
|
|||||||
Eventually some of the scripts and install files will be put into the files folder. This will allow initializing systems outside of the maintainer's home network.
|
Eventually some of the scripts and install files will be put into the files folder. This will allow initializing systems outside of the maintainer's home network.
|
||||||
|
|
||||||
There may also be a refactor of task-specific facts to be in their task file so that some playbooks can be more self-sufficient and be provided to the community without hacking. The original goal was to never define facts in tasks, but the benefit has yet to be seen for some tasks. Shared facts will definitely continue to exist under the facts tree.
|
There may also be a refactor of task-specific facts to be in their task file so that some playbooks can be more self-sufficient and be provided to the community without hacking. The original goal was to never define facts in tasks, but the benefit has yet to be seen for some tasks. Shared facts will definitely continue to exist under the facts tree.
|
||||||
|
|
||||||
|
## Other Notes
|
||||||
|
### Get Setup Values
|
||||||
|
Use this command to see the variables for a system: `ansible localhost -m setup --connection=local`.
|
@ -52,6 +52,16 @@
|
|||||||
cron: cronie
|
cron: cronie
|
||||||
when: ansible_pkg_mgr == "dnf"
|
when: ansible_pkg_mgr == "dnf"
|
||||||
|
|
||||||
|
- name: General | Facts | Package | zypper
|
||||||
|
set_fact:
|
||||||
|
sshfs: sshfs
|
||||||
|
locate: mlocate
|
||||||
|
opensshd: openssh
|
||||||
|
tar: tar
|
||||||
|
microcode_amd: ucode-amd
|
||||||
|
microcode_intel: ucode-intel
|
||||||
|
when: ansible_pkg_mgr == "zypper"
|
||||||
|
|
||||||
|
|
||||||
- name: General | Facts | Package | Update Commands | Helpers
|
- name: General | Facts | Package | Update Commands | Helpers
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -67,8 +77,8 @@
|
|||||||
update_package_manager: |
|
update_package_manager: |
|
||||||
echo "*** Apt ***" &&
|
echo "*** Apt ***" &&
|
||||||
sudo apt update &&
|
sudo apt update &&
|
||||||
sudo apt clean {{ update_accept_var }} &&
|
|
||||||
sudo apt autoremove {{ update_accept_var }} &&
|
sudo apt autoremove {{ update_accept_var }} &&
|
||||||
|
sudo apt clean {{ update_accept_var }} &&
|
||||||
sudo dpkg --configure -a &&
|
sudo dpkg --configure -a &&
|
||||||
sudo apt --fix-broken --fix-missing install &&
|
sudo apt --fix-broken --fix-missing install &&
|
||||||
sudo apt dist-upgrade --allow-downgrades --fix-broken --fix-missing {{ update_accept_var }} &&
|
sudo apt dist-upgrade --allow-downgrades --fix-broken --fix-missing {{ update_accept_var }} &&
|
||||||
@ -132,6 +142,22 @@
|
|||||||
sudo dnf upgrade {{ update_accept_var }} &&
|
sudo dnf upgrade {{ update_accept_var }} &&
|
||||||
when: ansible_pkg_mgr in ("dnf")
|
when: ansible_pkg_mgr in ("dnf")
|
||||||
|
|
||||||
|
- name: General | Facts | Package | Update Commands | zypper
|
||||||
|
set_fact:
|
||||||
|
update_package_manager: |
|
||||||
|
echo "*** Zypper ***" &&
|
||||||
|
sudo zypper refresh &&
|
||||||
|
sudo zypper cleanlocks &&
|
||||||
|
sudo zypper purge-kernels &&
|
||||||
|
sudo zypper clean -a &&
|
||||||
|
sudo zypper patch {{ update_accept_var }} &&
|
||||||
|
sudo zypper update {{ update_accept_var }} &&
|
||||||
|
sudo zypper dist-upgrade {{ update_accept_var }} &&
|
||||||
|
# This is a neat feature, but is installing things like GIMP from the
|
||||||
|
# repos when it is already installed through Flatpak, so not needed.
|
||||||
|
#sudo zypper install-new-recommends &&
|
||||||
|
when: ansible_pkg_mgr in ("zypper")
|
||||||
|
|
||||||
|
|
||||||
- name: General | Facts | Package | Update Commands | flatpak | check
|
- name: General | Facts | Package | Update Commands | flatpak | check
|
||||||
shell: which flatpak
|
shell: which flatpak
|
||||||
|
@ -89,3 +89,12 @@
|
|||||||
font_awesome: python3-XStatic-Font-Awesome
|
font_awesome: python3-XStatic-Font-Awesome
|
||||||
nfs: nfs-utils
|
nfs: nfs-utils
|
||||||
when: ansible_distribution == "Fedora"
|
when: ansible_distribution == "Fedora"
|
||||||
|
|
||||||
|
|
||||||
|
- name: Workstation | Facts | Package | openSUSE
|
||||||
|
set_fact:
|
||||||
|
flatpak_distro: true
|
||||||
|
firefox_esr: firefox-esr-branding-openSUSE
|
||||||
|
font_awesome: fontawesome-fonts
|
||||||
|
nfs: utils-libnfs
|
||||||
|
when: ansible_os_family == "Suse"
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
when: ansible_system == "Linux" and flatpak_distro
|
when: ansible_system == "Linux" and flatpak_distro
|
||||||
|
|
||||||
- include: tasks/workstation/linux/software/brave.yml
|
- include: tasks/workstation/linux/software/brave.yml
|
||||||
when: ansible_pkg_mgr in ("apt", "dnf") and not mobile
|
when: ansible_pkg_mgr in ("apt", "dnf", "zypper") and not mobile
|
||||||
|
|
||||||
- include: tasks/workstation/freebsd/software/packages.yml
|
- include: tasks/workstation/freebsd/software/packages.yml
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
||||||
@ -184,4 +184,3 @@
|
|||||||
|
|
||||||
- include: tasks/general/tests/lynis.yml
|
- include: tasks/general/tests/lynis.yml
|
||||||
- include: tasks/general/tests/nmap.yml
|
- include: tasks/general/tests/nmap.yml
|
||||||
|
|
||||||
|
4
setup.sh
4
setup.sh
@ -85,6 +85,10 @@ if [[ `which ansible > /dev/null; echo $?` != 0 ]]; then
|
|||||||
sudo dnf install -y ansible git python3-libselinux
|
sudo dnf install -y ansible git python3-libselinux
|
||||||
sudo mkdir -p /etc/ansible
|
sudo mkdir -p /etc/ansible
|
||||||
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
||||||
|
elif [[ $os == *openSUSE* ]]; then
|
||||||
|
sudo zypper install -y ansible git
|
||||||
|
sudo mkdir -p /etc/ansible
|
||||||
|
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
||||||
else
|
else
|
||||||
echo -e "ERROR: OS not detected."
|
echo -e "ERROR: OS not detected."
|
||||||
echo -e "$os"
|
echo -e "$os"
|
||||||
|
@ -72,11 +72,11 @@
|
|||||||
when: ansible_distribution == "Ubuntu"
|
when: ansible_distribution == "Ubuntu"
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: General | Software | Services | Install CROND (Looking at you, Fedora)
|
- name: General | Software | Services | Install CROND (Looking at you, Fedora+Mobian+openSUSE)
|
||||||
package:
|
package:
|
||||||
name: "{{ cron }}"
|
name: "{{ cron }}"
|
||||||
state: present
|
state: present
|
||||||
when: ansible_pkg_mgr == "dnf" or ansible_distribution == "Mobian"
|
when: ansible_pkg_mgr in ("dnf", "zypper") or ansible_distribution == "Mobian"
|
||||||
|
|
||||||
- name: General | Software | Services | Install killall (Looking at you, Debian)
|
- name: General | Software | Services | Install killall (Looking at you, Debian)
|
||||||
package:
|
package:
|
||||||
@ -93,6 +93,16 @@
|
|||||||
state: present
|
state: present
|
||||||
when: ansible_distribution == "Archlinux"
|
when: ansible_distribution == "Archlinux"
|
||||||
|
|
||||||
|
# openSUSE Tumbleweed comes without gnome-control-center being able to open
|
||||||
|
# properly. Hopefully just a one-time accident but I wanted bleeding edge so I
|
||||||
|
# guess I got it! Luckily was easy to figure out based on CLI error launching.
|
||||||
|
- name: General | Software | Services | Install Fix (Looking at you, openSUSE)
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- libvulkan1
|
||||||
|
state: present
|
||||||
|
when: ansible_pkg_mgr in ("zypper")
|
||||||
|
|
||||||
- name: General | Software | Packages | Update Software (Disabled)
|
- name: General | Software | Packages | Update Software (Disabled)
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
regexp: '{{ item.key }}'
|
regexp: '{{ item.key }}'
|
||||||
line: '{{ item.value }} # MANAGED BY ANSIBLE'
|
line: '{{ item.value }} # MANAGED BY ANSIBLE'
|
||||||
state: present
|
state: present
|
||||||
create: no
|
create: yes
|
||||||
backup: yes
|
backup: yes
|
||||||
loop:
|
loop:
|
||||||
- { "key": '^[\#]?AllowUsers', "value": 'AllowUsers {{ user }}'}
|
- { "key": '^[\#]?AllowUsers', "value": 'AllowUsers {{ user }}'}
|
||||||
@ -60,7 +60,7 @@
|
|||||||
regexp: '{{ item.key }}'
|
regexp: '{{ item.key }}'
|
||||||
line: '{{ item.value }} # MANAGED BY ANSIBLE'
|
line: '{{ item.value }} # MANAGED BY ANSIBLE'
|
||||||
state: present
|
state: present
|
||||||
create: no
|
create: yes
|
||||||
backup: yes
|
backup: yes
|
||||||
loop:
|
loop:
|
||||||
- { "key": '^[\#]?AllowUsers', "value": 'AllowUsers root {{ user }}'}
|
- { "key": '^[\#]?AllowUsers', "value": 'AllowUsers root {{ user }}'}
|
||||||
|
@ -48,7 +48,6 @@
|
|||||||
shell: "{{ item }}"
|
shell: "{{ item }}"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ ansible_env.HOME }}/Downloads/"
|
chdir: "{{ ansible_env.HOME }}/Downloads/"
|
||||||
warn: false
|
|
||||||
loop:
|
loop:
|
||||||
- mkdir -p {{ telegraf_path }}
|
- mkdir -p {{ telegraf_path }}
|
||||||
- mkdir -p {{ telegraf_config_path }}
|
- mkdir -p {{ telegraf_config_path }}
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
state: present
|
state: present
|
||||||
when: ansible_pkg_mgr == "dnf"
|
when: ansible_pkg_mgr == "dnf"
|
||||||
|
|
||||||
|
# https://brave.com/linux/#debian-ubuntu-mint
|
||||||
- name: Workstation | Software | Brave | Add Repo [apt]
|
- name: Workstation | Software | Brave | Add Repo [apt]
|
||||||
shell: "{{ item }}"
|
shell: "{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
@ -23,6 +24,7 @@
|
|||||||
- apt update
|
- apt update
|
||||||
when: ansible_pkg_mgr == "apt"
|
when: ansible_pkg_mgr == "apt"
|
||||||
|
|
||||||
|
# https://brave.com/linux/#fedora-centos-streamrhel
|
||||||
- name: Workstation | Software | Brave | Add Repo [dnf]
|
- name: Workstation | Software | Brave | Add Repo [dnf]
|
||||||
shell: "{{ item }}"
|
shell: "{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
@ -30,6 +32,14 @@
|
|||||||
- rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
|
- rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
|
||||||
when: ansible_pkg_mgr == "dnf"
|
when: ansible_pkg_mgr == "dnf"
|
||||||
|
|
||||||
|
# https://brave.com/linux/#opensuse
|
||||||
|
- name: Workstation | Software | Brave | Add Repo [zypper]
|
||||||
|
shell: "{{ item }}"
|
||||||
|
loop:
|
||||||
|
- rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
|
||||||
|
- sudo zypper addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
|
||||||
|
when: ansible_pkg_mgr == "zypper"
|
||||||
|
|
||||||
- name: Workstation | Software | Brave | Install
|
- name: Workstation | Software | Brave | Install
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
|
@ -22,13 +22,6 @@
|
|||||||
name: flathub
|
name: flathub
|
||||||
state: present
|
state: present
|
||||||
method: system
|
method: system
|
||||||
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
||||||
|
|
||||||
- name: Workstation | Linux | Flatpak Distro | Flatpak | Add Flathub for System (#2)
|
|
||||||
flatpak_remote:
|
|
||||||
name: flathub2
|
|
||||||
state: present
|
|
||||||
method: system
|
|
||||||
flatpakrepo_url: https://flathub.org/repo/flathub.flatpakrepo
|
flatpakrepo_url: https://flathub.org/repo/flathub.flatpakrepo
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user