Changing hostname on early task machines.

This commit is contained in:
Samuel Clay 2021-05-14 12:29:47 -04:00
parent 62a6f664e1
commit 22605d07cc
2 changed files with 8 additions and 1 deletions

View file

@ -65,3 +65,10 @@
path: /etc/hosts
line: "127.0.0.1 {{ inventory_hostname }}"
tags: hosts
- name: Set hostname
become: yes
hostname:
name: "{{ inventory_hostname }}"
tags: hosts

View file

@ -432,7 +432,7 @@ resource "digitalocean_droplet" "db-mongo-secondary" {
resource "digitalocean_droplet" "task-celery" {
count = 79
image = var.droplet_os
name = "task-celery${count.index+1}"
name = format("task-celery%02v", count.index+1)
region = var.droplet_region
size = var.droplet_size
ssh_keys = [digitalocean_ssh_key.default.fingerprint]