radekg / terraform-provisioner-ansible

Ansible with Terraform 0.14.x
Apache License 2.0
572 stars 100 forks source link

Support ansible-galaxy install #133

Closed donovanmuller closed 4 years ago

donovanmuller commented 5 years ago

It would be great to add support for ansible-galaxy install before running plays. Especially in the form of a requirements.yml E.g.

...
  provisioner "ansible" {
    plays {
      galaxy {
         requirements = [
            file_path = "${path.module}/ansible/requirements.yml"
         ]
      }
      playbook {
        file_path = "${path.module}/ansible/playbooks/example.yml"
        roles_path = [
          "${path.module}/ansible/roles"
        ]
      }
    }
...

or something like that...

radekg commented 5 years ago

This looks like a good candidate to implement. Should not be very difficult to add.