Skip to content

Commit

Permalink
Merge pull request #36 from cobbler/docs/update-and-check
Browse files Browse the repository at this point in the history
CI: Add linting workflow
  • Loading branch information
SchoolGuy authored Oct 9, 2024
2 parents 3f8c167 + 8b79b9e commit be4c2bb
Show file tree
Hide file tree
Showing 8 changed files with 189 additions and 145 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Linting

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint_docs:
runs-on: ubuntu-latest
# Only verify this on PRs
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Install tfplugindocs
run: |
go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@latest
- name: Run tfplugindocs
run: |
tfplugindocs
- name: Check for changes
run: |
if [[ $(git diff | wc --lines) -gt 0 ]]; then false; fi
lint_go:
name: Linting Go
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: golangci-lint
# https://github.com/golangci/golangci-lint-action
uses: golangci/golangci-lint-action@v6
with:
version: v1.61
10 changes: 5 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ provider "cobbler" {

### Required

- **password** (String) The password to the Cobbler service. This can also be specified with the `COBBLER_PASSWORD` shell environment variable.
- **url** (String) The url to the Cobbler service. This can also be specified with the `COBBLER_URL` shell environment variable.
- **username** (String) The username to the Cobbler service. This can also be specified with the `COBBLER_USERNAME` shell environment variable.
- `password` (String) The password to the Cobbler service. This can also be specified with the `COBBLER_PASSWORD` shell environment variable.
- `url` (String) The url to the Cobbler service. This can also be specified with the `COBBLER_URL` shell environment variable.
- `username` (String) The username to the Cobbler service. This can also be specified with the `COBBLER_USERNAME` shell environment variable.

### Optional

- **cacert_file** (String) The path or contents of an SSL CA certificate. This can also be specified with the `COBBLER_CACERT_FILE`shell environment variable.
- **insecure** (Boolean) The url to the Cobbler service. This can also be specified with the `COBBLER_URL` shell environment variable.
- `cacert_file` (String) The path or contents of an SSL CA certificate. This can also be specified with the `COBBLER_CACERT_FILE`shell environment variable.
- `insecure` (Boolean) The url to the Cobbler service. This can also be specified with the `COBBLER_URL` shell environment variable.
32 changes: 17 additions & 15 deletions docs/resources/distro.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,25 @@ resource "cobbler_distro" "Ubuntu-2004-x86_64" {

### Required

- **breed** (String) The "breed" of distribution. Valid options are: redhat, fedora, centos, scientific linux, suse, debian, and ubuntu. These choices may vary depending on the version of Cobbler in use.
- **initrd** (String) Absolute path to initrd on filesystem. This must already exist prior to creating the distro.
- **kernel** (String) Absolute path to kernel on filesystem. This must already exist prior to creating the distro.
- **name** (String) A name for the distro.
- **os_version** (String) The version of the distro you are creating. This varies with the version of Cobbler you are using. An updated signature list may need to be obtained in order to support a newer version. Example: `focal`.
- `breed` (String) The "breed" of distribution. Valid options are: redhat, fedora, centos, scientific linux, suse, debian, and ubuntu. These choices may vary depending on the version of Cobbler in use.
- `initrd` (String) Absolute path to initrd on filesystem. This must already exist prior to creating the distro.
- `kernel` (String) Absolute path to kernel on filesystem. This must already exist prior to creating the distro.
- `name` (String) A name for the distro.
- `os_version` (String) The version of the distro you are creating. This varies with the version of Cobbler you are using. An updated signature list may need to be obtained in order to support a newer version. Example: `focal`.

### Optional

- **arch** (String) The architecture of the distro. Valid options are: i386, x86_64, ia64, ppc, ppc64, s390, arm.
- **boot_files** (String) Files copied into tftpboot beyond the kernel/initrd.
- **comment** (String) Free form text description.
- **fetchable_files** (String) Templates for tftp or wget.
- **id** (String) The ID of this resource.
- **kernel_options** (String) Kernel options to use with the kernel.
- **kernel_options_post** (String) Post install Kernel options to use with the kernel after installation.
- **mgmt_classes** (List of String) Management classes for external config management.
- **owners** (List of String) Owners list for authz_ownership.
- **template_files** (String) File mappings for built-in config management.
- `arch` (String) The architecture of the distro. Valid options are: i386, x86_64, ia64, ppc, ppc64, s390, arm.
- `boot_files` (List of String) Files copied into tftpboot beyond the kernel/initrd.
- `boot_loaders` (List of String) Must be either 'grub', 'pxe', or 'ipxe'.
- `comment` (String) Free form text description.
- `fetchable_files` (List of String) Templates for tftp or wget.
- `kernel_options` (List of String) Kernel options to use with the kernel.
- `kernel_options_post` (List of String) Post install Kernel options to use with the kernel after installation.
- `mgmt_classes` (List of String) Management classes for external config management.
- `owners` (List of String) Owners list for authz_ownership.
- `template_files` (List of String) File mappings for built-in config management.

### Read-Only

- `id` (String) The ID of this resource.
67 changes: 34 additions & 33 deletions docs/resources/profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,41 +25,42 @@ resource "cobbler_profile" "my_profile" {

### Required

- **distro** (String) Parent distribution.
- **name** (String) The name of the profile.
- `distro` (String) Parent distribution.
- `name` (String) The name of the profile.

### Optional

- **autoinstall** (String) Template remote kickstarts or preseeds.
- **autoinstall_meta** (String) Automatic installation template metadata, formerly Kickstart metadata.
- **boot_files** (String) Files copied into tftpboot beyond the kernel/initrd.
- **comment** (String) Free form text description.
- **dhcp_tag** (String) DHCP tag.
- **enable_gpxe** (Boolean) Use gPXE instead of PXELINUX for advanced booting options.
- **enable_menu** (Boolean) Enable a boot menu.
- **fetchable_files** (String) Templates for tftp or wget.
- **id** (String) The ID of this resource.
- **kernel_options** (String) Kernel options for the profile.
- **kernel_options_post** (String) Post install kernel options.
- **mgmt_classes** (List of String) For external configuration management.
- **mgmt_parameters** (String) Parameters which will be handed to your management application (Must be a valid YAML dictionary).
- **name_servers** (List of String) Name servers.
- **name_servers_search** (List of String) Name server search settings.
- **next_server_v4** (String) The next_server_v4 option is used for DHCP/PXE as the IP of the TFTP server from which network boot files are downloaded. Usually, this will be the same IP as the server setting.
- **next_server_v6** (String) The next_server_v4 option is used for DHCP/PXE as the IP of the TFTP server from which network boot files are downloaded. Usually, this will be the same IP as the server setting.
- **owners** (List of String) Owners list for authz_ownership.
- **parent** (String) The parent this profile inherits settings from.
- **proxy** (String) Proxy URL.
- **repos** (List of String) Repos to auto-assign to this profile.
- **server** (String) The server-override for the profile.
- **template_files** (String) File mappings for built-in config management.
- **virt_auto_boot** (String) Auto boot virtual machines.
- **virt_bridge** (String) The bridge for virtual machines.
- **virt_cpus** (String) The number of virtual CPUs
- **virt_disk_driver** (String) The virtual machine disk driver.
- **virt_file_size** (String) The virtual machine file size.
- **virt_path** (String) The virtual machine path.
- **virt_ram** (String) The amount of RAM for the virtual machine.
- **virt_type** (String) The type of virtual machine. Valid options are: xenpv, xenfv, qemu, kvm, vmware, openvz.
- `autoinstall` (String) Template remote kickstarts or preseeds.
- `autoinstall_meta` (List of String) Automatic installation template metadata, formerly Kickstart metadata.
- `boot_files` (List of String) Files copied into tftpboot beyond the kernel/initrd.
- `comment` (String) Free form text description.
- `dhcp_tag` (String) DHCP tag.
- `enable_gpxe` (Boolean) Use gPXE instead of PXELINUX for advanced booting options.
- `enable_menu` (Boolean) Enable a boot menu.
- `fetchable_files` (List of String) Templates for tftp or wget.
- `kernel_options` (List of String) Kernel options for the profile.
- `kernel_options_post` (List of String) Post install kernel options.
- `mgmt_classes` (List of String) For external configuration management.
- `mgmt_parameters` (String) Parameters which will be handed to your management application (Must be a valid YAML dictionary).
- `name_servers` (List of String) Name servers.
- `name_servers_search` (List of String) Name server search settings.
- `next_server_v4` (String) The next_server_v4 option is used for DHCP/PXE as the IP of the TFTP server from which network boot files are downloaded. Usually, this will be the same IP as the server setting.
- `next_server_v6` (String) The next_server_v6 option is used for DHCP/PXE as the IP of the TFTP server from which network boot files are downloaded. Usually, this will be the same IP as the server setting.
- `owners` (List of String) Owners list for authz_ownership.
- `parent` (String) The parent this profile inherits settings from.
- `proxy` (String) Proxy URL.
- `repos` (List of String) Repos to auto-assign to this profile.
- `server` (String) The server-override for the profile.
- `template_files` (List of String) File mappings for built-in config management.
- `virt_auto_boot` (String) Auto boot virtual machines.
- `virt_bridge` (String) The bridge for virtual machines.
- `virt_cpus` (String) The number of virtual CPUs
- `virt_disk_driver` (String) The virtual machine disk driver.
- `virt_file_size` (String) The virtual machine file size.
- `virt_path` (String) The virtual machine path.
- `virt_ram` (String) The amount of RAM for the virtual machine.
- `virt_type` (String) The type of virtual machine. Valid options are: xenpv, xenfv, qemu, kvm, vmware, openvz.

### Read-Only

- `id` (String) The ID of this resource.
35 changes: 18 additions & 17 deletions docs/resources/repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,24 @@ resource "cobbler_repo" "my_repo" {

### Required

- **breed** (String) The "breed" of distribution. Valid options are: rsync, rhn, yum, apt, and wget. These choices may vary depending on the version of Cobbler in use.
- **mirror** (String) Address of the repo to mirror.
- **name** (String) A name for the repo.
- `breed` (String) The "breed" of distribution. Valid options are: rsync, rhn, yum, apt, and wget. These choices may vary depending on the version of Cobbler in use.
- `mirror` (String) Address of the repo to mirror.
- `name` (String) A name for the repo.

### Optional

- **apt_components** (List of String) List of Apt components such as main, restricted, universe. Applicable to apt breeds only.
- **apt_dists** (List of String) List of Apt distribution names such as focal, focal-updates. Applicable to apt breeds only.
- **arch** (String) The architecture of the repo. Valid options are: i386, x86_64, ia64, ppc, ppc64, s390, arm.
- **comment** (String) Free form text description.
- **createrepo_flags** (String) Flags to use with `createrepo`.
- **environment** (String) Environment variables to use during repo command execution.
- **id** (String) The ID of this resource.
- **keep_updated** (Boolean) Update the repo upon Cobbler sync. Valid values are true or false.
- **mirror_locally** (Boolean) Whether to copy the files locally or just references to the external files. Valid values are true or false.
- **owners** (List of String) List of Owners for authz_ownership.
- **proxy** (String) Proxy to use for downloading the repo. This argument does not work on older versions of Cobbler.
- **rpm_list** (List of String) List of specific RPMs to mirror.


- `apt_components` (List of String) List of Apt components such as main, restricted, universe. Applicable to apt breeds only.
- `apt_dists` (List of String) List of Apt distribution names such as focal, focal-updates. Applicable to apt breeds only.
- `arch` (String) The architecture of the repo. Valid options are: i386, x86_64, ia64, ppc, ppc64, s390, arm.
- `comment` (String) Free form text description.
- `createrepo_flags` (String) Flags to use with `createrepo`.
- `environment` (String) Environment variables to use during repo command execution.
- `keep_updated` (Boolean) Update the repo upon Cobbler sync. Valid values are true or false.
- `mirror_locally` (Boolean) Whether to copy the files locally or just references to the external files. Valid values are true or false.
- `owners` (List of String) List of Owners for authz_ownership.
- `proxy` (String) Proxy to use for downloading the repo. This argument does not work on older versions of Cobbler.
- `rpm_list` (List of String) List of specific RPMs to mirror.

### Read-Only

- `id` (String) The ID of this resource.
10 changes: 4 additions & 6 deletions docs/resources/snippet.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ resource "cobbler_snippet" "my_snippet" {

### Required

- **body** (String) The body of the snippet. May also point to a file: `body = file("my_snippet")`.
- **name** (String) The name of the snippet. This must be the name only, so without `/var/lib/cobbler/snippets`.

### Optional

- **id** (String) The ID of this resource.
- `body` (String) The body of the snippet. May also point to a file: `body = file("my_snippet")`.
- `name` (String) The name of the snippet. This must be the name only, so without `/var/lib/cobbler/snippets`.

### Read-Only

- `id` (String) The ID of this resource.
Loading

0 comments on commit be4c2bb

Please sign in to comment.