Coder Social home page Coder Social logo

stdevel / ansible-uyuni Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 2.0 151 KB

Ansible role for installing and configuring Uyuni or SUSE Manager server

License: Apache License 2.0

Python 83.97% Shell 10.46% Jinja 5.57%
uyuni spacewalk ansible ansible-role linux system-management suse-manager

ansible-uyuni's People

Contributors

stdevel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ansible-uyuni's Issues

Implement firewall rules

It would be great to have the possibility to create firewall rules needed for Uyuni:

Port Description
tcp/22 SSH
tcp/80 http
tcp/443 https
tcp/4505 + 4506 Salt
tcp/69 TFTP, optional
tcp/5222 Traditional clients, optional
tcp/5269 Proxy communication, optional

Add possibility to skip LVM

Some systems don't require a second disk for application data (e.g. temporary Vagrant boxes), so it would be handy having the possibility to skip LVM tasks.

Implement SUSE Manager support

As Uyuni is the upstream project for SUSE Manager, it would be nice to also have it supported. The package/pattern names are exactly the same.

Needed changes:

  • task to enter registration code
  • ensure having appropriate repository enabled

Add support for Uyuni 2020.07+ / openSUSE Leap 15 SP2 and SUSE Manager 4.1 / SLES 15 SP2

Currently the pre-requisite check fails:

TASK [stdevel.uyuni : Ensure having 15 SP1 release] ****************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Please upgrade to SP1"}

NOTE: SUSE Manager 4.0.x (based on SLES 15 SP1) is still supported until June 2021.

errata import missing perl dependencies

Since opensuse 15.4 the perl TimeDate module is not installed anymore and also is not available on the default repositories.
To install the missing package we have to add the dedicated perl repo first, then we can install it:

# zypper addrepo https://download.opensuse.org/repositories/devel:languages:perl/15.4/devel:languages:perl.repo
# zypper refresh
# zypper in perl-TimeDate

After that the import will run again

Add hint about jmespath

The Python package jmespath is required - otherwise the playbook will fail:

ASK [stdevel.uyuni : Register system] *****************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The conditional check 'scc_registration.stdout | from_json | json_query(query_filter) | join | lower != \"registered\"' failed. The error was: You need to install \"jmespath\" prior to running json_query filter\n\nThe error appears to be in '/home/sles/.ansible/roles/stdevel.uyuni/tasks/prepare_sles.yml': line 9, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Register system\n  ^ here\n"}

Implement tags

It would be good to tag the particular tasks for easier debugging and skipping.

Use loops for LVM stuff

Currently, the LVM code looks really duplicated (dedicated tasks per LV, filesystem and mount). It would great having a loop for this stuff.

Implement content staging

It would be great to also have the possibility to create software channels via spacewalk-common-channels (from the spacewalk-utils package).

Tasks:

  • install requirements
  • create channels

SuSEconnect url addition (feature request)

Hi Christian

It would be nice to have a parameter uyuni_scc_url in order to specify URL to use for registration; could be useful e.g. in cloud environments to specify --url=scc.suse.com

Thanks, Dietmar

Add support for IBM Power and Z

SUSE Manager can also be installed on IBM Z, it would be great to have support for it. Currently, required SCC modules are hardcoded to x86_64.

It might be sufficient to replace x86_64 in defaults/main.yml with {{ ansible_architecture }} to also allow ppc64le and s390x..

Add support for JeOS

In accordance with the official documentation it would be good to implement the following "hack" to replace the base product with SUSE Manager:

# rpm -e --nodeps sles-release
# vi /etc/zypp/zypp.conf
...
solver.onlyRequires = false

ESC ZZ
# SUSEConnect -p SUSE-Manager-Server/4.0/x86_64 -r <code> -e <mail>
# SUSEConnect -p sle-module-basesystem/15.1/x86_64
# SUSEConnect -p sle-module-python2/15.1/x86_64
# SUSEConnect -p sle-module-server-applications/15.1/x86_64
# SUSEConnect -p sle-module-web-scripting/15.1/x86_64
# SUSEConnect -p sle-module-suse-manager-server/<productnumber>/x86_64
# ln -s /etc/products.d/SUSE-Manager-Server.prod /etc/products.d/baseproduct
# zypper in yast2-storage-ng

Implement CEFS/DEFS

After implementing content staging (see also issue #3) it would be handy to have the possibility to enable CentOS and Debian errata import. There are two Perl utilities for this.

This requires the following steps:

  • Install requirements (perl, perl-Text-Unidecode)
  • Download and place errata import scripts
  • Create cronjob for downloading/updating errata information

Missing SLE modules

Hi

I have tried installing the SUSE Manager 4.0 using the Ansible.
Encountered error during the installation and found the modules needs to be updated with the following order.
requesting you to kindly update the code base with the changes.

sles_modules:

  - name: sle-module-basesystem
    identifier: sle-module-basesystem/15.1/x86_64
  - name: sle-module-web-scripting
    identifier: sle-module-web-scripting/15.1/x86_64
  - name: sle-module-python2
    identifier: sle-module-python2/15.1/x86_64
  - name: sle-module-suse-manager-server
    identifier: sle-module-suse-manager-server/4.0/x86_64
  - name: sle-module-server-applications
    identifier: sle-module-server-applications/15.1/x86_64
  - name: sle-module-desktop-applications
    identifier: sle-module-desktop-applications/15.1/x86_64
  - name: sle-module-development-tools
    identifier: sle-module-development-tools/15.1/x86_64

Add partition for /var/cache/rhn

Currently, the Ansible role won't automatically create a dedicated /var/cache/rhn partition. This might led into storage problems as at least 20 GB are required.

Rename role to uyuni

It would be easier to have the role named "uyuni" instead of "ansible-uyuni".

Modules acitivation - python2 for SLES SP4 not possible

Hello Christian,

when installing Suse Manager on SP4, it is not possible to activate the module python2

- name: sle-module-python2
   identifier: "sle-module-python2/{{ ansible_distribution_version }}/{{ ansible_architecture }}"

I have changed it to python3 and it was working.
So, maybe you need to check which SP is installed to put the right python module.

Best regards,
steffen

Add option for enabling monitoring

It would be nice to have an option to pre-enable monitoring by installing the following packages:

# zypper in golang-github-prometheus-node_exporter golang-github-wrouesnel-postgres_exporter prometheus-jmx_exporter golang-github-lusitaniae-apache_exporter prometheus-jmx_exporter-tomcat

Maybe there is also a way for enabling monitoring in the WebUI...

Add option for release pinning

As older releases are currently mirrored until further notice, it would be an option to add version pinning for installation. Details here: https://build.opensuse.org/project/subprojects/systemsmanagement:Uyuni:Snapshots

Release Date Snapshot Repository
4.0.0 26.10.2018 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:4.0.0 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/4.0.0/images/
4.0.1 19.12.2018 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:4.0.1 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/4.0.1/images/
4.0.2 02.08.2019 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:4.0.2 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/4.0.2/images/
2020.01 31.01.2020 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2020.01 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2020.01/images/
2020.03 19.03.2020 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2020.03 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2020.01/images/
2020.04 16.04.2020 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2020.04 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2020.04/images/
2020.05 21.05.2020 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2020.05 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2020.05/images/
2020.06 15.06.2020 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2020.06 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2020.06/images/
2020.07 24.07.2020 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2020.07 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2020.07/images/
2020.09 22.09.2020 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2020.09 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2020.09/images/
2020.11 26.11.2020 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2020.11 not available
2021.01 05.02.2021 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2021.01 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2021.01/images/
2021.02 01.03.2021 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2021.02 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2021.02/images/
2021.04 21.04.2021 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2021.04 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2021.04/images/
2021.05 24.05.2021 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2021.05 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2021.05/images/
2021.06 24.06.2021 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2021.06 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2021.06/images/
2021.08 13.08.2021 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2021.08 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2021.08/images/
2021.09 23.09.2021 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2021.09 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2021.09/images/
2021.12 09.12.2021 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2021.12 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2021.12/images/
2022.01 26.01.2022 https://build.opensuse.org/project/show/systemsmanagement:Uyuni:Snapshots:2022.01 https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2022.01/images/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.