Files
system-config/roles/set-hostname/tasks/main.yml
James E. Blair 6f6ae8d6ff Remove nodepool configuration
This removes the nodepool hosts from inventory and all of their jobs
and configuration.  Since the zuul-launchers use the "nodepool"
clouds.yaml and associated template variables, those are all renamed
to "zuul".

The corresponding changes (additions of zuul_* variables, not removal
of nodepool_* vars) has been made on bridge.

Change-Id: I7ab28706b2bd20cf4f90b3b45a640fc341976e47
Depends-On: https://review.opendev.org/955235
2025-07-16 20:20:36 +00:00

26 lines
692 B
YAML

# Setting hostname with systemd apparently
# requires dbus. We have this on our cloud-provided
# nodes, but not on the minimal ones we get from
# zuul image builds.
- name: ensure dbus for working hostnamectl
become: true
apt:
name: dbus
state: present
# Set hostname and /etc/hosts
# Inspired by:
# https://github.com/ansible/ansible/pull/8482)
# https://gist.github.com/rothgar/8793800
- name: Set /etc/hostname
become: true
hostname: name="{{ inventory_hostname.split('.', 1)[0] }}"
- name: Set /etc/hosts
become: true
template: src=hosts.j2 dest=/etc/hosts mode=0644
- name: Set /etc/mailname
become: true
template: src=mailname.j2 dest=/etc/mailname mode=0644