Rearrange set-hostnames and cloud-init removal
In launch-node, we run two playbooks that aren't part of base. One sets the system's hostname and removes cloud-init, the other runs unattended update. We need to run the hostname setting in our functional tests so that the hosts behave as expected, but running the cloud-init removal is a little weird, since our test nodes already don't have it. Make it so that set-hostname actually just sets the hostname, and then run it in run-base. For running puppet, we need the host to have the correct hostname. Move cloud-init removal to the base-server role. Also move the autoremove into base-server, since it's probably a nice way to get rid of excess things. Change-Id: I53cb8c515444a7d73b839e799c5794b067429daa
This commit is contained in:
parent
3e4d99b6fd
commit
68b50ca05b
@ -41,8 +41,12 @@
|
|||||||
- popularity-contest
|
- popularity-contest
|
||||||
- lxd
|
- lxd
|
||||||
- lxd-client
|
- lxd-client
|
||||||
|
- cloud-init
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
|
- name: Get rid of extra depends
|
||||||
|
command: apt-get autoremove -y
|
||||||
|
|
||||||
- name: Configure file limits
|
- name: Configure file limits
|
||||||
copy:
|
copy:
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
Set hostname
|
Set hostname
|
||||||
|
|
||||||
Remove ``cloud-init`` and statically set the hostname, hosts and
|
Statically set the hostname, hosts and mailname
|
||||||
mailname
|
|
||||||
|
|
||||||
**Role Variables**
|
**Role Variables**
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
---
|
# Setting hostname with systemd apparently
|
||||||
- name: Remove cloud-init
|
# requires dbus. We have this on our cloud-provided
|
||||||
package:
|
# nodes, but not on the minimal ones we get from
|
||||||
name: cloud-init
|
# nodepool.
|
||||||
state: absent
|
- name: ensure dbus for working hostnamectl
|
||||||
|
apt:
|
||||||
- name: Get rid of cloud-init depends
|
name: dbus
|
||||||
command: apt-get autoremove -y
|
state: present
|
||||||
|
|
||||||
# Set hostname and /etc/hosts
|
# Set hostname and /etc/hosts
|
||||||
# Inspired by:
|
# Inspired by:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
- hosts: "{{ target }}"
|
- hosts: "!disabled"
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
user: root
|
user: root
|
||||||
roles:
|
roles:
|
||||||
|
@ -90,6 +90,8 @@
|
|||||||
dest: /home/zuul/src/opendev.org/opendev/system-config/playbooks/host_vars/bridge.openstack.org.yaml
|
dest: /home/zuul/src/opendev.org/opendev/system-config/playbooks/host_vars/bridge.openstack.org.yaml
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Set hostname on host
|
||||||
|
command: ansible-playbook -v /home/zuul/src/opendev.org/opendev/system-config/playbooks/set-hostnames.yaml
|
||||||
- name: Run base.yaml
|
- name: Run base.yaml
|
||||||
command: ansible-playbook -v /home/zuul/src/opendev.org/opendev/system-config/playbooks/base.yaml
|
command: ansible-playbook -v /home/zuul/src/opendev.org/opendev/system-config/playbooks/base.yaml
|
||||||
- name: Run bridge service playbook
|
- name: Run bridge service playbook
|
||||||
|
Loading…
Reference in New Issue
Block a user