Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOPS-102 Generate Ansible Inventory #61

Merged
merged 87 commits into from
Aug 31, 2021
Merged

TOPS-102 Generate Ansible Inventory #61

merged 87 commits into from
Aug 31, 2021

Conversation

aaronsaderholm
Copy link
Collaborator

@aaronsaderholm aaronsaderholm commented Aug 31, 2021

  • Generates terraform/hosts.ini
  • Split up ip_address and CIDR mask variables in LXC module
  • Added DNS, Graylog, NTP and TFTP, Zabbix container entries.
  • DHCP, DNS, NTP now have "count logic" instead of redundant entries.
  • LXC containers have memory in MB as optional parameter defaulting to 512
  • PVE cluster name now automatically derived using proven programmer methodologies designed to incur hatred.
  • Added aaron-dev as a auto-build gitlab-ci branch.

aaronsaderholm and others added 30 commits June 30, 2021 22:33
* feat: update .gitignore

* feat: add base and test VMs

* fix: update variable names to match existing scheme

* feat: add missing terraform pre-commit

* fix: update workflow

* fix: re-add tflint
…rt (#44)

* Add script to manually install Proxmox plugin

- Add Bash script to download and install forked version of Terraform
  Proxmox plugin
- Add script to before_script stage of GitLab CI config
- Update minimum Proxmox plugin version to ensure we get the newer
  forked plugin

* Add Proxmox provider setup to GitHub CI

* Use Bash to run Proxmox provider script

Can't guarantee that permissions will be right to run the script
directly.

* Specify full local path to Proxmox provider script

There's a default `working-directory` statement but I don't know if it's
working.

* Flail some more

- Add an `ls` to see where this stuff is actually running

* Fix Proxmox provider script name

oh wow it really was that stupid wasn't it

* Clone the Proxmox provider repo

* Use HTTPS to clone repo

* Remove check parameter for `terraform fmt`

This causes GitHub action to fail when formatting changes are required.

* Comment out version check for now

The install process finds my fork of the plugin as version v0.0.0.
Instead of making a new tag in the forked repo, just comment out the
version for now.  (Hopefully this works.)

* Fix plugin path, required_providers

* Run Proxmox plugin install with Bash in GitLab too

* Fix GitHub pre-commit pipeline

* Fix pre-commit complaining about my script lol

* Make sure proxmox-api-go updates get installed

* Use go get instead

* Add hastate parameter to default container and VM

* Clean Go module cache before installing

* Specify proxmox-api-go version

* Change plugin provider name

* Remove extraneous step

* Run terraform init in proxmox provider script

* Remove -migrate-state parameter to terraform init

It broke the custom provider location stuff

* Try local terraform.d directory

* Try the directory Terraform complains about

* Revert to original module to test

I want to see where the modules are being installed now...

* Fix provider directory

I forgot about a cd...

* Cleanup directory location before creating

* Try the plugin directory again

* Re-add newer version requirement

* Try the documented plugin dir again

Also force the newer version again to make sure we're getting the
modified plugin.

* Fix working directory for pre-commit GitHub CI

* fix: truthy on -> no

* Also copy provider into module directories

* Fix variable ordering

* Probably fix module path

* why u no work

* no quotes doofus

* NEWLINE

Co-authored-by: Aaron Saderholm <[email protected]>
* Switch back to my fork for testing

* Don't manually install my fork of proxmox-api-go

* Switch back to upstream
* feat: update .gitignore

* feat: add base and test VMs

* fix: update variable names to match existing scheme

* feat: add missing terraform pre-commit

* fix: update workflow

* fix: re-add tflint

* feat: add playbook for rsyslog

* fix: move back to telmate proxmox provider

* feat: add firewall rules and cron entry to compress logs
* fix: remove now outdated script

* fix: remove old pre-commit workflot option
Copy link
Collaborator

@claughinghouse claughinghouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some comments around hard coding branches as well as explaining what is going on in a few files?

Did you update the IP address assignments in Confluence?

.gitlab-ci.yml Show resolved Hide resolved
.gitlab-ci.yml Show resolved Hide resolved
terraform/lxc-dhcp.tf Show resolved Hide resolved
terraform/lxc-dns.tf Show resolved Hide resolved
@aaronsaderholm aaronsaderholm merged commit 0ad1e6e into main Aug 31, 2021
@aaronsaderholm aaronsaderholm deleted the TOPS-102 branch August 31, 2021 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ansible Managed Devices Hosts file ftp DHCP DNS
3 participants