-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Proxy - DNS Signed-off-by: Ondra Machacek <omachace@redhat.com>
- Loading branch information
1 parent
3d35896
commit c009ba5
Showing
10 changed files
with
233 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
system_settings_resize_storage: false | ||
system_settings_dns_mode_append: false | ||
system_settings_proxy: [] | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- name: Restart ntpd | ||
vmware.vmware_rest.appliance_services: | ||
vcenter_hostname: "{{ system_settings_hostname | d(omit) }}" | ||
vcenter_password: "{{ system_settings_password | d(omit) }}" | ||
vcenter_username: "{{ system_settings_username | d(omit) }}" | ||
vcenter_validate_certs: "{{ system_settings_validate_certs | d(omit) }}" | ||
service: ntpd | ||
state: restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
- name: Append the DNS servers | ||
vmware.vmware_rest.appliance_networking_dns_servers: | ||
vcenter_hostname: "{{ system_settings_hostname | d(omit) }}" | ||
vcenter_password: "{{ system_settings_password | d(omit) }}" | ||
vcenter_username: "{{ system_settings_username | d(omit) }}" | ||
vcenter_validate_certs: "{{ system_settings_validate_certs | d(omit) }}" | ||
mode: "{{ system_settings_dns_mode | d(omit) }}" | ||
server: "{{ item }}" | ||
state: "add" | ||
loop: "{{ system_settings_dns_servers | d([]) }}" | ||
when: "system_settings_dns_mode is defined or system_settings_dns_servers is defined" | ||
|
||
- name: Set the DNS servers | ||
vmware.vmware_rest.appliance_networking_dns_servers: | ||
vcenter_hostname: "{{ system_settings_hostname | d(omit) }}" | ||
vcenter_password: "{{ system_settings_password | d(omit) }}" | ||
vcenter_username: "{{ system_settings_username | d(omit) }}" | ||
vcenter_validate_certs: "{{ system_settings_validate_certs | d(omit) }}" | ||
mode: "{{ system_settings_dns_mode | d(omit) }}" | ||
servers: "{{ system_settings_dns_servers | d(omit) }}" | ||
state: "set" | ||
when: | ||
"(system_settings_dns_mode is defined or system_settings_dns_servers is defined) and not system_settings_dns_mode_append" | ||
|
||
- name: Append the DNS domains | ||
vmware.vmware_rest.appliance_networking_dns_domains: | ||
vcenter_hostname: "{{ system_settings_hostname | d(omit) }}" | ||
vcenter_password: "{{ system_settings_password | d(omit) }}" | ||
vcenter_username: "{{ system_settings_username | d(omit) }}" | ||
vcenter_validate_certs: "{{ system_settings_validate_certs | d(omit) }}" | ||
domain: "{{ item }}" | ||
state: "add" | ||
loop: "{{ system_settings_dns_domains }}" | ||
when: "system_settings_dns_domains is defined and system_settings_dns_mode_append" | ||
|
||
- name: Set the DNS domains | ||
vmware.vmware_rest.appliance_networking_dns_domains: | ||
vcenter_hostname: "{{ system_settings_hostname | d(omit) }}" | ||
vcenter_password: "{{ system_settings_password | d(omit) }}" | ||
vcenter_username: "{{ system_settings_username | d(omit) }}" | ||
vcenter_validate_certs: "{{ system_settings_validate_certs | d(omit) }}" | ||
domains: "{{ system_settings_dns_domains }}" | ||
state: "set" | ||
when: "system_settings_dns_domains is defined and not system_settings_dns_mode_append" | ||
|
||
- name: Set the DNS hostname | ||
vmware.vmware_rest.appliance_networking_dns_hostname: | ||
vcenter_hostname: "{{ system_settings_hostname | d(omit) }}" | ||
vcenter_password: "{{ system_settings_password | d(omit) }}" | ||
vcenter_username: "{{ system_settings_username | d(omit) }}" | ||
vcenter_validate_certs: "{{ system_settings_validate_certs | d(omit) }}" | ||
name: "{{ system_settings_dns_hostname | d(omit) }}" | ||
state: "set" | ||
when: "system_settings_dns_hostname is defined" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
- name: Set NTP servers | ||
when: system_settings_ntp_servers is defined | ||
block: | ||
- name: Test NTP servers | ||
vmware.vmware_rest.appliance_ntp: | ||
vcenter_hostname: "{{ system_settings_hostname | d(omit) }}" | ||
vcenter_password: "{{ system_settings_password | d(omit) }}" | ||
vcenter_username: "{{ system_settings_username | d(omit) }}" | ||
vcenter_validate_certs: "{{ system_settings_validate_certs | d(omit) }}" | ||
state: test | ||
servers: "{{ system_settings_ntp_servers }}" | ||
register: __ntp_state | ||
|
||
- name: Print the state of NTP servers | ||
ansible.builtin.debug: | ||
msg: "Warning: server {{ item.server }} status: {{ item.message }}" | ||
loop: "{{ __ntp_state.value }}" | ||
when: item.status == 'SERVER_UNREACHABLE' | ||
|
||
- name: Set NTP servers | ||
vmware.vmware_rest.appliance_ntp: | ||
vcenter_hostname: "{{ system_settings_hostname | d(omit) }}" | ||
vcenter_password: "{{ system_settings_password | d(omit) }}" | ||
vcenter_username: "{{ system_settings_username | d(omit) }}" | ||
vcenter_validate_certs: "{{ system_settings_validate_certs | d(omit) }}" | ||
servers: "{{ system_settings_ntp_servers }}" | ||
notify: Restart ntpd | ||
|
||
- name: Set the timesync mode | ||
vmware.vmware_rest.appliance_timesync: | ||
vcenter_hostname: "{{ system_settings_hostname | d(omit) }}" | ||
vcenter_password: "{{ system_settings_password | d(omit) }}" | ||
vcenter_username: "{{ system_settings_username | d(omit) }}" | ||
vcenter_validate_certs: "{{ system_settings_validate_certs | d(omit) }}" | ||
mode: "NTP" | ||
notify: Restart ntpd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
- name: Set the noproxy hosts | ||
vmware.vmware_rest.appliance_networking_noproxy: | ||
vcenter_hostname: "{{ system_settings_hostname | d(omit) }}" | ||
vcenter_password: "{{ system_settings_password | d(omit) }}" | ||
vcenter_username: "{{ system_settings_username | d(omit) }}" | ||
vcenter_validate_certs: "{{ system_settings_validate_certs | d(omit) }}" | ||
servers: "{{ system_settings_noproxy }}" | ||
when: "system_settings_noproxy is defined" | ||
notify: Restart ntpd | ||
|
||
- name: Configure the proxy configuration | ||
vmware.vmware_rest.appliance_networking_proxy: | ||
vcenter_hostname: "{{ system_settings_hostname | d(omit) }}" | ||
vcenter_password: "{{ system_settings_password | d(omit) }}" | ||
vcenter_username: "{{ system_settings_username | d(omit) }}" | ||
vcenter_validate_certs: "{{ system_settings_validate_certs | d(omit) }}" | ||
enabled: "{{ item.enabled | mandatory }}" | ||
server: "{{ item.url | mandatory }}" | ||
port: "{{ item.port | mandatory }}" | ||
protocol: "{{ item.protocol | mandatory }}" | ||
state: "{{ item.state | d(omit) }}" | ||
username: "{{ item.username | d(omit) }}" | ||
password: "{{ item.password | d(omit) }}" | ||
loop: "{{ system_settings_proxy }}" | ||
notify: Restart ntpd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters