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

Add variable to handle NTP server #90

Merged
merged 2 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelogs/fragments/90__add_ntp_var.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
minor_changes:
- Add variable `provision_vcenter_vm_ntp_server` to handle ntp server
- Set default value of `time.nist.gov`
3 changes: 3 additions & 0 deletions roles/provision_vcenter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ pyvomi
- **provision_vcenter_vm_network_dns**:
- list(str), A list of DNS servers the vcenter vm should use. Required if network mode is set to 'static'.

- **provision_vcenter_vm_ntp_server**:
- str or int, Server to use for NTP source.
Copy link
Collaborator

Choose a reason for hiding this comment

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

is int for IPs, or is there another way to specify the NTP servers besides hostname/IP?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes just for pure IPs if used. I was just copying what was done for the other IP vars. It probably should only be str.


- **provision_vcenter_vm_network_ip_family**:
- str, The IP family that the VM should use for its network. ipv4 or ipv6. Default is ipv4

Expand Down
1 change: 1 addition & 0 deletions roles/provision_vcenter/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ provision_vcenter_vm_enable_ssh: true
provision_vcenter_vm_enable_ceip: false
provision_vcenter_iso_mount_point: /tmp/vcenter_iso
provision_vcenter_vm_network_ip_family: ipv4
provision_vcenter_vm_ntp_server: time.nist.gov
2 changes: 1 addition & 1 deletion roles/provision_vcenter/templates/config_parts/vm.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
"os": {
"password": "{{ provision_vcenter_vm_password }}",
"ssh_enable": {{ provision_vcenter_vm_enable_ssh | bool | to_json }},
"ntp_servers": "time.nist.gov"
"ntp_servers": "{{ provision_vcenter_vm_ntp_server }}"
}
Loading