holmesb / terraform-provider-cobbler-1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cobbler Terraform Provider

The Cobbler provider is used to interact with a locally installed Cobbler service.
The provider needs to be configured with the proper credentials before it can be used.

Original code by Joe Topjian.

Prerequisites

  • Terraform, 0.14 and above
  • Cobbler, release 3.2.0 (or higher), with caching disabled.
    Set cache_enabled: 0 in file /etc/cobbler/settings.

Using the Provider

Full documentation can be found in the docs directory.

Terraform 0.13 and above

You can use the provider via the Terraform provider registry.

Terraform 0.12 or manual installation

You can download a pre-built binary from the releases page.
These are built using GoReleaser (the configuration is in the repo).

Download and add the pre-built binary for your system (Linux or macOS) to ~/.terraform.d/plugins/.
Replace linux with darwin for the macOS version.

wget https://github.com/cobbler/terraform-provider-cobbler/releases/download/v2.0.3/terraform-provider-cobbler_2.0.3_linux_amd64.zip
unzip terraform-provider-cobbler_2.0.3_linux_amd64.zip
mkdir -p ~/.terraform.d/plugins/
mv terraform-provider-cobbler_v2.0.3 ~/.terraform.d/plugins/
chmod +x ~/.terraform.d/plugins/terraform-provider-cobbler_v2.0.3

Don't forget to run terraform init after installation of a new binary!

Make sure the file variables.tf contains the right version in the provider block:

provider "cobbler" {
  version  = "~> 2.0.3"
  username = var.cobbler_username
  password = var.cobbler_password
  url      = var.cobbler_url
}

Development

If you want to build from source, you can simply use make in the root of the repository.

About

License:Mozilla Public License 2.0


Languages

Language:Go 91.2%Language:Shell 5.1%Language:Makefile 1.9%Language:HCL 1.8%