Skip to content

Commit

Permalink
docs: technical debt
Browse files Browse the repository at this point in the history
- General cleanup of the documentation.
- Standardize heading for Required and Optional.
- Standardize headings for HCL and JSON.
- Standardize leading with HCL examples.
- Format for cleanliness.
- Moves `builder/vsphere/examples/` to `examples/`.

Signed-off-by: Ryan Johnson <[email protected]>
  • Loading branch information
tenthirtyam committed May 24, 2024
1 parent 3cca8d6 commit 70a5f5d
Show file tree
Hide file tree
Showing 35 changed files with 64 additions and 287 deletions.
6 changes: 3 additions & 3 deletions .web-docs/components/builder/vsphere-iso/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ their respective End of General Support dates. For detailed information, refer t

## Examples

- Basic examples are available in the [examples](https://github.com/hashicorp/packer-plugin-vsphere/tree/main/builder/vsphere/examples/)
directory of the GitHub repository.
- Basic examples are available in the [examples](https://github.com/hashicorp/packer-plugin-vsphere/tree/main/examples/)
directory of the GitHub repository.

- Additional examples are available in the [`vmware-samples/packer-examples-for-vsphere`](https://github.com/vmware-samples/packer-examples-for-vsphere)
GitHub repository maintained by VMware by Broadcom.
GitHub repository maintained by VMware by Broadcom.

## Configuration Reference

Expand Down
34 changes: 18 additions & 16 deletions .web-docs/components/builder/vsphere-supervisor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ their respective End of General Support dates. For detailed information, refer t

## Examples

Examples are available in the [examples](https://github.com/hashicorp/packer-plugin-vsphere/tree/main/builder/vsphere/examples/)
Examples are available in the [examples](https://github.com/hashicorp/packer-plugin-vsphere/tree/main/examples/)
directory of the GitHub repository.

HCL Example:
Expand Down Expand Up @@ -358,8 +358,8 @@ Content of `cleanup-playbook.yml`:
group: root
mode: "{{ item.mode }}"
loop:
- { path: /etc/machine-id, state: absent, mode: "0644" }
- { path: /etc/machine-id, state: touch, mode: "0644" }
- { path: /etc/machine-id, state: absent, mode: "0644" }
- { path: /etc/machine-id, state: touch, mode: "0644" }

- name: Truncate audit logs
file:
Expand All @@ -369,20 +369,20 @@ Content of `cleanup-playbook.yml`:
group: utmp
mode: "{{ item.mode }}"
loop:
- { path: /var/log/wtmp, state: absent, mode: "0664" }
- { path: /var/log/lastlog, state: absent, mode: "0644" }
- { path: /var/log/wtmp, state: touch, mode: "0664" }
- { path: /var/log/lastlog, state: touch, mode: "0644" }
- { path: /var/log/wtmp, state: absent, mode: "0664" }
- { path: /var/log/lastlog, state: absent, mode: "0644" }
- { path: /var/log/wtmp, state: touch, mode: "0664" }
- { path: /var/log/lastlog, state: touch, mode: "0644" }

- name: Remove cloud-init lib dir and logs
file:
state: absent
path: "{{ item }}"
loop:
- /var/lib/cloud
- /var/log/cloud-init.log
- /var/log/cloud-init-output.log
- /var/run/cloud-init
- /var/lib/cloud
- /var/log/cloud-init.log
- /var/log/cloud-init-output.log
- /var/run/cloud-init

- name: Truncate all remaining log files in /var/log
shell:
Expand All @@ -399,9 +399,9 @@ Content of `cleanup-playbook.yml`:
depth: 1
file_type: any
paths:
- /tmp
- /var/tmp
pattern: '*'
- /tmp
- /var/tmp
pattern: "*"
register: temp_files

- name: Reset temp space
Expand All @@ -415,6 +415,8 @@ Content of `cleanup-playbook.yml`:
state: absent
path: "{{ item.path }}"
loop:
- { path: /root/.bash_history }
- { path: "/home/{{ ansible_env.SUDO_USER | default(ansible_user_id) }}/.bash_history" }
- { path: /root/.bash_history }
- {
path: "/home/{{ ansible_env.SUDO_USER | default(ansible_user_id) }}/.bash_history",
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ the virtual machine as a template and moves it to your specified path.
their respective End of General Support dates. For detailed information, refer to the
[Broadcom Product Lifecycle](https://support.broadcom.com/group/ecx/productlifecycle).

## Examples

Examples are available in the [examples](https://github.com/hashicorp/packer-plugin-vsphere/tree/main/examples/)
directory of the GitHub repository.

## Configuration Reference

The following configuration options are available for the post-processor.
Expand Down
7 changes: 6 additions & 1 deletion .web-docs/components/post-processor/vsphere/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ The artifact must be a VMX, OVA, or OVF file.
their respective End of General Support dates. For detailed information, refer to the
[Broadcom Product Lifecycle](https://support.broadcom.com/group/ecx/productlifecycle).

## Examples

Examples are available in the [examples](https://github.com/hashicorp/packer-plugin-vsphere/tree/main/examples/)
directory of the GitHub repository.

## Configuration Reference

The following configuration options are available for the post-processor.
Expand Down Expand Up @@ -146,7 +151,7 @@ JSON Example:
"cluster": "cluster-01",
"datastore": "datastore-01",
"vm_network": "VM Network",
"keep_input_artifact": true,
"keep_input_artifact": true
}
]
]
Expand Down
6 changes: 3 additions & 3 deletions docs/builders/vsphere-iso.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ their respective End of General Support dates. For detailed information, refer t

## Examples

- Basic examples are available in the [examples](https://github.com/hashicorp/packer-plugin-vsphere/tree/main/builder/vsphere/examples/)
directory of the GitHub repository.
- Basic examples are available in the [examples](https://github.com/hashicorp/packer-plugin-vsphere/tree/main/examples/)
directory of the GitHub repository.

- Additional examples are available in the [`vmware-samples/packer-examples-for-vsphere`](https://github.com/vmware-samples/packer-examples-for-vsphere)
GitHub repository maintained by VMware by Broadcom.
GitHub repository maintained by VMware by Broadcom.

## Configuration Reference

Expand Down
34 changes: 18 additions & 16 deletions docs/builders/vsphere-supervisor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ their respective End of General Support dates. For detailed information, refer t

## Examples

Examples are available in the [examples](https://github.com/hashicorp/packer-plugin-vsphere/tree/main/builder/vsphere/examples/)
Examples are available in the [examples](https://github.com/hashicorp/packer-plugin-vsphere/tree/main/examples/)
directory of the GitHub repository.

HCL Example:
Expand Down Expand Up @@ -164,8 +164,8 @@ Content of `cleanup-playbook.yml`:
group: root
mode: "{{ item.mode }}"
loop:
- { path: /etc/machine-id, state: absent, mode: "0644" }
- { path: /etc/machine-id, state: touch, mode: "0644" }
- { path: /etc/machine-id, state: absent, mode: "0644" }
- { path: /etc/machine-id, state: touch, mode: "0644" }

- name: Truncate audit logs
file:
Expand All @@ -175,20 +175,20 @@ Content of `cleanup-playbook.yml`:
group: utmp
mode: "{{ item.mode }}"
loop:
- { path: /var/log/wtmp, state: absent, mode: "0664" }
- { path: /var/log/lastlog, state: absent, mode: "0644" }
- { path: /var/log/wtmp, state: touch, mode: "0664" }
- { path: /var/log/lastlog, state: touch, mode: "0644" }
- { path: /var/log/wtmp, state: absent, mode: "0664" }
- { path: /var/log/lastlog, state: absent, mode: "0644" }
- { path: /var/log/wtmp, state: touch, mode: "0664" }
- { path: /var/log/lastlog, state: touch, mode: "0644" }

- name: Remove cloud-init lib dir and logs
file:
state: absent
path: "{{ item }}"
loop:
- /var/lib/cloud
- /var/log/cloud-init.log
- /var/log/cloud-init-output.log
- /var/run/cloud-init
- /var/lib/cloud
- /var/log/cloud-init.log
- /var/log/cloud-init-output.log
- /var/run/cloud-init

- name: Truncate all remaining log files in /var/log
shell:
Expand All @@ -205,9 +205,9 @@ Content of `cleanup-playbook.yml`:
depth: 1
file_type: any
paths:
- /tmp
- /var/tmp
pattern: '*'
- /tmp
- /var/tmp
pattern: "*"
register: temp_files

- name: Reset temp space
Expand All @@ -221,6 +221,8 @@ Content of `cleanup-playbook.yml`:
state: absent
path: "{{ item.path }}"
loop:
- { path: /root/.bash_history }
- { path: "/home/{{ ansible_env.SUDO_USER | default(ansible_user_id) }}/.bash_history" }
- { path: /root/.bash_history }
- {
path: "/home/{{ ansible_env.SUDO_USER | default(ansible_user_id) }}/.bash_history",
}
```
5 changes: 5 additions & 0 deletions docs/post-processors/vsphere-template.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ the virtual machine as a template and moves it to your specified path.
their respective End of General Support dates. For detailed information, refer to the
[Broadcom Product Lifecycle](https://support.broadcom.com/group/ecx/productlifecycle).

## Examples

Examples are available in the [examples](https://github.com/hashicorp/packer-plugin-vsphere/tree/main/examples/)
directory of the GitHub repository.

## Configuration Reference

The following configuration options are available for the post-processor.
Expand Down
7 changes: 6 additions & 1 deletion docs/post-processors/vsphere.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ The artifact must be a VMX, OVA, or OVF file.
their respective End of General Support dates. For detailed information, refer to the
[Broadcom Product Lifecycle](https://support.broadcom.com/group/ecx/productlifecycle).

## Examples

Examples are available in the [examples](https://github.com/hashicorp/packer-plugin-vsphere/tree/main/examples/)
directory of the GitHub repository.

## Configuration Reference

The following configuration options are available for the post-processor.
Expand Down Expand Up @@ -92,7 +97,7 @@ JSON Example:
"cluster": "cluster-01",
"datastore": "datastore-01",
"vm_network": "VM Network",
"keep_input_artifact": true,
"keep_input_artifact": true
}
]
]
Expand Down
43 changes: 0 additions & 43 deletions example/README.md

This file was deleted.

22 changes: 0 additions & 22 deletions example/build.pkr.hcl

This file was deleted.

69 changes: 0 additions & 69 deletions example/preseed_hardcoded_ip.cfg

This file was deleted.

0 comments on commit 70a5f5d

Please sign in to comment.