<commit_before>data "template_file" "provision_first_manager" {
  template = "${file("${path.module}/scripts/provision-first-manager.sh")}"

  vars {
    docker_cmd   = "${var.docker_cmd}"
    availability = "${var.availability}"
  }
}

data "template_file" "provision_manager" {
  template = "${file("${path.module}/scripts/provision-manager.sh")}"

  vars {
    docker_cmd   = "${var.docker_cmd}"
    availability = "${var.availability}"
  }
}

resource "digitalocean_droplet" "manager" {
  ssh_keys           = "${var.ssh_keys}"
  image              = "${var.image}"
  region             = "${var.region}"
  size               = "${var.size}"
  private_networking = true
  backups            = "${var.backups}"
  ipv6               = false
  tags               = ["${var.tags}"]

  # user_data          = "${var.user_data}"
  count = "${var.total_instances}"
  name  = "${format("%s-%02d.%s.%s", var.name, count.index + 1, var.region, var.domain)}"

  connection {
    type        = "ssh"
    user        = "${var.provision_user}"
    private_key = "${file("${var.provision_ssh_key}")}"
    timeout     = "${var.connection_timeout}"
  }

  provisioner "file" {
    content     = "${data.template_file.provision_first_manager.rendered}"
    destination = "/tmp/provision-first-manager.sh"
  }

  provisioner "remote-exec" {
    inline = [
      "chmod +x /tmp/provision-first-manager.sh",
      "if [ ${count.index} -eq 0 ]; then /tmp/provision-first-manager.sh ${self.ipv4_address_private}; fi",
    ]
  }
<commit_msg>fix(managers): uncomment user_data variable<commit_after>data "template_file" "provision_first_manager" {
  template = "${file("${path.module}/scripts/provision-first-manager.sh")}"

  vars {
    docker_cmd   = "${var.docker_cmd}"
    availability = "${var.availability}"
  }
}

data "template_file" "provision_manager" {
  template = "${file("${path.module}/scripts/provision-manager.sh")}"

  vars {
    docker_cmd   = "${var.docker_cmd}"
    availability = "${var.availability}"
  }
}

resource "digitalocean_droplet" "manager" {
  ssh_keys           = "${var.ssh_keys}"
  image              = "${var.image}"
  region             = "${var.region}"
  size               = "${var.size}"
  private_networking = true
  backups            = "${var.backups}"
  ipv6               = false
  tags               = ["${var.tags}"]
  user_data          = "${var.user_data}"
  count              = "${var.total_instances}"
  name               = "${format("%s-%02d.%s.%s", var.name, count.index + 1, var.region, var.domain)}"

  connection {
    type        = "ssh"
    user        = "${var.provision_user}"
    private_key = "${file("${var.provision_ssh_key}")}"
    timeout     = "${var.connection_timeout}"
  }

  provisioner "file" {
    content     = "${data.template_file.provision_first_manager.rendered}"
    destination = "/tmp/provision-first-manager.sh"
  }

  provisioner "remote-exec" {
    inline = [
      "chmod +x /tmp/provision-first-manager.sh",
      "if [ ${count.index} -eq 0 ]; then /tmp/provision-first-manager.sh ${self.ipv4_address_private}; fi",
    ]
  }

{'fraction_non_alphanumeric': 0.1738287560581583, 'fraction_numerical': 0.0038772213247172858, 'mean_word_length': 2.5916473317865427, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2453382', 'n_tokens_mistral': 1050, 'n_tokens_neox': 1012, 'n_words': 161}