How to install Ansible in SUSE Linux Enterprise SLES Server 15 SP3?
Today we're going to talk about the easier way to install and maintain Ansible inside SUSE Linux Enterprise (aka SLES) Server 15 SP3 using the Package Hub repository.
I'm Luca Berton and welcome to today's episode of Ansible Pilot.
How to install Ansible in SLES 15 SP3
- use SUSE Package Hub repository
Today we're talking about How to install Ansible in SUSE Linux Enterprise 15 SP 3.
The easier way to install and maintain Ansible inside SUSE Linux Enterprise version 15 SP 3 is using the SUSE Package Hub repository maintained by the SUSE community.
Links
- [SUSE Package Hub - Community Packages for SUSE Linux Enterprise Server / Desktop](https://packagehub.suse.com/)
- [How to register SLES using the SUSEConnect command line tool](https://www.suse.com/support/kb/doc/?id=000018564)
- [Adding SUSE Package Hub repositories to SUSE Linux Enterprise Server](https://www.suse.com/support/kb/doc/?id=000018789)
## Playbook
Install the latest version of ansible in SUSE Linux Enterprise Server 15 SP3.
code
- Install-Ansible-SLES-15-SP3.sh
``bash
#!/bin/bash
SUSEConnect --status
SUSEConnect --list-extensions
SUSEConnect -p PackageHub/15.3/x86_64
zypper install ansible
zypper info ansible
ansible --version
`
execution
``bash
$ ssh [email protected]
devops@sles:~> sudo su
sles:/home/devops # cat /etc/os-release
NAME="SLES"
VERSION="15-SP3"
VERSION_ID="15.3"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP3"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15:sp3"
DOCUMENTATION_URL="https://documentation.suse.com/"
sles:/home/devops # hostnamectl
Static hostname: sles.example.com
Transient hostname: sles
Icon name: computer-vm
Chassis: vm
Machine ID: 4a241aac39fa4e75b13748c714c05c47
Boot ID: 150e32975f4d4fdd801eb605f7e35393
Virtualization: oracle
Operating System: SUSE Linux Enterprise Server 15 SP3
CPE OS Name: cpe:/o:suse:sles:15:sp3
Kernel: Linux 5.3.18-57-default
Architecture: x86-64
sles:/home/devops # uname -a
Linux sles 5.3.18-57-default #1 SMP Wed Apr 28 10:54:41 UTC 2021 (ba3c2e9) x86_64 x86_64 x86_64 GNU/Linux
sles:/home/devops # SUSEConnect --status
[{"identifier":"sle-module-basesystem","version":"15.3","arch":"x86_64","status":"Registered"},{"identifier":"SLES","version":"15.3","arch":"x86_64","status":"Registered","regcode":"","starts_at":"2021-12-07 00:00:00 UTC","expires_at":"2022-02-07 00:00:00 UTC","subscription_status":"ACTIVE","type":"evaluation"},{"identifier":"sle-module-server-applications","version":"15.3","arch":"x86_64","status":"Registered"}]
sles:/home/devops # zypper refresh
Repository 'SLE-Module-Basesystem15-SP3-Pool' is up to date.
Repository 'SLE-Module-Basesystem15-SP3-Updates' is up to date.
Repository 'SLE-Product-SLES15-SP3-Pool' is up t