GuíasGuides · Nivel 3Level 3

Ubuntu Landscape: registrar la flota de Ubuntu y parchear por grupos con ventanaUbuntu Landscape: registering the Ubuntu fleet and patching by group within a window

El cliente de Landscape con Ubuntu Pro, grupos de acceso y etiquetas, el perfil de actualizaciones que parchea cada grupo en su ventana, los reinicios pendientes y el informe de CVE para la reunión de parcheo.The Landscape client with Ubuntu Pro, access groups and tags, the upgrade profile that patches each group in its window, pending reboots and the CVE report for the patching meeting.

Qué vas a conseguir

Ver los servidores (y los escritorios) Ubuntu en una consola: qué versión tienen, qué parches les faltan, cuáles necesitan reinicio, y que las actualizaciones de seguridad se apliquen solas por grupos, en la ventana de cada grupo, con un informe para el ticket mensual. Es lo que Ansible hace por línea de comandos (guía de Ansible), con la vista de flota que el negocio quiere ver.

Antes de empezar

  • Ubuntu Pro activado en las máquinas (pro status); Landscape SaaS viene incluido, y la versión autoalojada también requiere Pro en los clientes.
  • Acceso a landscape.canonical.com (SaaS) o al servidor Landscape propio con una cuenta de administrador.
  • Decidir los grupos: por entorno (prod, test) y por ventana de parcheo (martes 22:00, jueves 22:00). Dos o tres grupos bastan al principio.
  • Salida HTTPS de los clientes hacia Landscape.

1. Registrar un cliente

bash · srv-web-02 (Ubuntu 24.04)
sudo pro status | grep -E 'landscape|esm-infra'esm-infra        yes       enabled   Expanded Security Maintenance for Infrastructurelandscape        yes       disabled  Management and administration tool for Ubuntusudo apt-get install -y landscape-clientsudo landscape-config --computer-title "srv-web-02" --account-name contoso-it --registration-key "$(sudo cat /root/.landscape-key)" --tags prod,web,window-tue --access-group prod --silentPlease wait...System successfully registered.sudo landscape-config --is-registered && echo REGISTEREDREGISTERED
Landscape · Computers
ComputersPending computers
srv-web-02 · Ubuntu 24.04.1 LTS · Tagsprod, web, window-tue · Access group: prod
Accept
Reject

Tres cosas en el registro: el título igual que el hostname, las etiquetas (entorno, rol y ventana) y el grupo de acceso, que decide quién puede administrar la máquina en Landscape. La clave de registro va en un fichero con permisos 600, no en el historial de Bash; con Ansible, este paso es una tarea con la clave en ansible-vault. En Pending computers aceptas (o automatizas la aceptación por clave).

2. Grupos de acceso y etiquetas

Landscape · Access groups
AccountAccess groups
global · (todo)
prod · Padreglobal · Administradores: IT Ops · Equipos: 23
test · Padreglobal · Administradores: IT Ops, Desarrollo · Equipos: 11
ComputersSearch
tagprod AND tag:window-tue
Resultados12 equipos
Save search as: prod-tuesday

Los grupos de acceso controlan permisos (Desarrollo puede reiniciar los de test, no los de prod); las etiquetas controlan a quién se aplica cada perfil. Una búsqueda guardada (prod-tuesday) es lo que luego referencias en los perfiles y los informes. Si una máquina cambia de ventana, cambias la etiqueta y nada más.

3. El perfil de actualizaciones

Landscape · Upgrade profiles
ProfilesUpgrade profilesAdd upgrade profile
Nameprod-security-tuesday
Upgrade type[x] Security upgrades only
ScheduleWeekly · Tuesday · 22:00 · Deliver within: 2 hours
Autoremove[x]
Access groupprod
Tagsprod, window-tue
Save
ProfilesUpgrade profilesAdd upgrade profile
Nametest-all-wednesday
Upgrade type[x] All upgrades
ScheduleWeekly · Wednesday · 20:00 · Deliver within: 2 hours
Tagstest
Save

Test recibe todo los miércoles; prod recibe solo seguridad los martes, una semana después de que lo mismo haya pasado por test. Lo que no es seguridad en prod va en el ciclo mensual, como ventana de cambios con su ticket. Deliver within: 2 hours reparte el inicio para que doce servidores no descarguen a la vez.

4. Reinicios pendientes

Landscape · Computers
ComputersSearch: tag:prod AND alert:computer-reboot
srv-web-01 · Reboot required · Since21/10/2026 22:41 · Kernel 6.8.0-47 → 6.8.0-48
srv-db-01 · Reboot required · Since21/10/2026 22:38
Resultados5 equipos
[Select all] [Reboot] › Deliver after: 22/10/2026 23:00 · Deliver within: 1 hour
Activity queued"Reboot 5 computers" · Approval: required (prod)

El parche de seguridad se aplica solo; el reinicio no, y bien está. La alerta computer-reboot lista quién lo necesita; la actividad de reinicio se programa a la hora de la ventana y, en prod, exige aprobación de un segundo administrador (Account → Alerts → Computer reboot required y Activities → Approval required). Eso es el ticket de cambio con cuatro ojos sin salir de la consola. Por línea de comandos, lo mismo que veías en la guía de Ubuntu: /var/run/reboot-required.

5. El informe para la reunión de parcheo

Landscape · Reports
ReportsUSG & SecuritySecurity upgrades reportTag: prod
Equipos23 · Totalmente parcheados: 19 · Con parches de seguridad pendientes: 4 · Con reinicio pendiente: 5
CVE abiertos (prod)7 · Críticos: 1 (CVE-2026-xxxxx · openssl · 2 equipos)
Equipos sin contacto > 7 días1 (srv-legacy-03)
Download CSV
Schedule report
bash · máquina de control (API de Landscape)
landscape-api --json get-computers --query "tag:prod AND alert:security-upgrades" | jq -r '.[] | "\(.hostname)\t\(.last_ping_time)"'srv-app-01	2026-10-22T08:14:02Zsrv-legacy-03	2026-10-14T21:02:19Z

Tres números y una lista: parcheados / pendientes / reinicio, y el CVE crítico con nombre de paquete y equipos. Schedule report lo manda al buzón del equipo el lunes; landscape-api (o la API REST) saca lo mismo para el repo de evidencias. srv-legacy-03 sin contacto desde hace ocho días es el hallazgo real de este informe: o está apagado o el cliente de Landscape no arranca.

6. Lo que revisas cada mes

  • Equipos sin contacto más de 7 días: apagados, migrados o con el cliente roto (sudo systemctl status landscape-client).
  • Actividades fallidas (Activities → Failed): normalmente un apt bloqueado por un dpkg interrumpido; sudo dpkg --configure -a lo arregla.
  • Equipos en prod con todas las actualizaciones pendientes desde hace un mes: la ventana mensual no se está ejecutando.
  • Versiones de Ubuntu: lo que ya está en ESM (esm-infra) va a la lista de migraciones; Landscape te lo marca por equipo.

Siguientes pasos

  • Perfiles de paquetes y de repositorio: que todos los prod tengan el agente de monitorización y usen el mirror interno; Landscape los instala y avisa de la desviación.
  • Scripts remotos (Scripts → Run): el mismo check de la guía de Bash lanzado a los 23 de prod con la salida en la consola.
  • Si la flota incluye Windows y RHEL, Landscape solo cubre Ubuntu: el inventario único lo hace Ansible, y Landscape queda como la consola de parches y CVE de la parte Ubuntu.

¿Falta algo o en tu entorno es distinto? Escríbeme y lo corrijo.

What you'll get

See the Ubuntu servers (and desktops) in one console: which version they run, which patches they are missing, which ones need a reboot, and have security updates apply on their own by group, in each group's window, with a report for the monthly ticket. It is what Ansible does from the command line (Ansible guide), with the fleet view the business wants to see.

Before you start

  • Ubuntu Pro enabled on the machines (pro status); Landscape SaaS is included, and the self-hosted version also requires Pro on the clients.
  • Access to landscape.canonical.com (SaaS) or your own Landscape server with an administrator account.
  • Decide the groups: by environment (prod, test) and by patch window (Tuesday 22:00, Thursday 22:00). Two or three groups are enough at first.
  • HTTPS egress from the clients to Landscape.

1. Register a client

bash · srv-web-02 (Ubuntu 24.04)
sudo pro status | grep -E 'landscape|esm-infra'esm-infra        yes       enabled   Expanded Security Maintenance for Infrastructurelandscape        yes       disabled  Management and administration tool for Ubuntusudo apt-get install -y landscape-clientsudo landscape-config --computer-title "srv-web-02" --account-name contoso-it --registration-key "$(sudo cat /root/.landscape-key)" --tags prod,web,window-tue --access-group prod --silentPlease wait...System successfully registered.sudo landscape-config --is-registered && echo REGISTEREDREGISTERED
Landscape · Computers
ComputersPending computers
srv-web-02 · Ubuntu 24.04.1 LTS · Tagsprod, web, window-tue · Access group: prod
Accept
Reject

Three things at registration: the title equal to the hostname, the tags (environment, role and window) and the access group, which decides who can administer the machine in Landscape. The registration key lives in a file with 600 permissions, not in the Bash history; with Ansible, this step is one task with the key in ansible-vault. In Pending computers you accept (or automate acceptance by key).

2. Access groups and tags

Landscape · Access groups
AccountAccess groups
global · (everything)
prod · Parentglobal · Administrators: IT Ops · Computers: 23
test · Parentglobal · Administrators: IT Ops, Development · Computers: 11
ComputersSearch
tagprod AND tag:window-tue
Results12 computers
Save search as: prod-tuesday

Access groups control permissions (Development can reboot test machines, not prod); tags control which profile applies to whom. A saved search (prod-tuesday) is what you later reference in profiles and reports. If a machine changes window, you change the tag and nothing else.

3. The upgrade profile

Landscape · Upgrade profiles
ProfilesUpgrade profilesAdd upgrade profile
Nameprod-security-tuesday
Upgrade type[x] Security upgrades only
ScheduleWeekly · Tuesday · 22:00 · Deliver within: 2 hours
Autoremove[x]
Access groupprod
Tagsprod, window-tue
Save
ProfilesUpgrade profilesAdd upgrade profile
Nametest-all-wednesday
Upgrade type[x] All upgrades
ScheduleWeekly · Wednesday · 20:00 · Deliver within: 2 hours
Tagstest
Save

Test gets everything on Wednesdays; prod gets security only on Tuesdays, a week after the same thing has gone through test. Non-security updates in prod go in the monthly cycle, as a change window with its ticket. Deliver within: 2 hours spreads the start so twelve servers don't download at once.

4. Pending reboots

Landscape · Computers
ComputersSearch: tag:prod AND alert:computer-reboot
srv-web-01 · Reboot required · Since21/10/2026 22:41 · Kernel 6.8.0-47 → 6.8.0-48
srv-db-01 · Reboot required · Since21/10/2026 22:38
Results5 computers
[Select all] [Reboot] › Deliver after: 22/10/2026 23:00 · Deliver within: 1 hour
Activity queued"Reboot 5 computers" · Approval: required (prod)

The security patch applies on its own; the reboot does not, and rightly so. The computer-reboot alert lists who needs it; the reboot activity is scheduled at the window time and, in prod, requires approval from a second administrator (Account → Alerts → Computer reboot required and Activities → Approval required). That is the four-eyes change ticket without leaving the console. From the command line, the same thing you saw in the Ubuntu guide: /var/run/reboot-required.

5. The report for the patching meeting

Landscape · Reports
ReportsUSG & SecuritySecurity upgrades reportTag: prod
Computers23 · Fully patched: 19 · With pending security upgrades: 4 · With pending reboot: 5
Open CVEs (prod)7 · Critical: 1 (CVE-2026-xxxxx · openssl · 2 computers)
Computers not seen > 7 days1 (srv-legacy-03)
Download CSV
Schedule report
bash · control machine (Landscape API)
landscape-api --json get-computers --query "tag:prod AND alert:security-upgrades" | jq -r '.[] | "\(.hostname)\t\(.last_ping_time)"'srv-app-01	2026-10-22T08:14:02Zsrv-legacy-03	2026-10-14T21:02:19Z

Three numbers and a list: patched / pending / reboot, and the critical CVE with package name and machines. Schedule report sends it to the team mailbox on Monday; landscape-api (or the REST API) pulls the same for the evidence repo. srv-legacy-03 not seen for eight days is the real finding of this report: it is either off or the Landscape client is not starting.

6. What you review each month

  • Computers not seen for more than 7 days: off, migrated or with a broken client (sudo systemctl status landscape-client).
  • Failed activities (Activities → Failed): usually apt blocked by an interrupted dpkg; sudo dpkg --configure -a fixes it.
  • Prod machines with all updates pending for a month: the monthly window is not running.
  • Ubuntu versions: whatever is already in ESM (esm-infra) goes on the migration list; Landscape flags it per machine.

Next steps

  • Package profiles and repository profiles: every prod machine has the monitoring agent and uses the internal mirror; Landscape installs them and flags drift.
  • Remote scripts (Scripts → Run): the same check from the Bash guide launched on the 23 prod machines with the output in the console.
  • If the fleet includes Windows and RHEL, Landscape only covers Ubuntu: the single inventory is Ansible's job, and Landscape remains the patch and CVE console for the Ubuntu part.

Is something missing, or different in your environment? Get in touch and I'll fix it.

Tech Career Lab · newsletter

¿Te ha servido? Cada dos semanas envío una idea práctica para perfiles IT: LinkedIn, proyectos, networking y procesos de selección.Found this useful? Every two weeks I send one practical idea for IT professionals: LinkedIn, projects, networking and hiring processes.

Apúntate y llévate las 33 ideasSign up and get the 33 ideas →