-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add example to vars.yml. Improve line spacing * First attempt; using urlencode
- Loading branch information
Showing
3 changed files
with
64 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
- hosts: localhost | ||
connection: local | ||
|
||
tasks: | ||
- name: Template /etc/chrony.conf | ||
set_fact: | ||
chronyconf: | | ||
{% for ntpserver in net2NTPServers %}server {{ ntpserver }} iburst | ||
{% endfor %} | ||
driftfile /var/lib/chrony/drift | ||
makestep 1.0 3 | ||
rtcsync | ||
logdir /var/log/chrony | ||
when: net2NTPServers is defined | ||
|
||
- name: Create Net2 NTP MachineConfig | ||
k8s: | ||
state: present | ||
definition: | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
labels: | ||
machineconfiguration.openshift.io/role: net2 | ||
name: 03-net2-ntp | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.2.0 | ||
storage: | ||
files: | ||
- path: /etc/chrony.conf | ||
mode: 0644 | ||
overwrite: true | ||
contents: | ||
source: "data:,{{ chronyconf | urlencode }}" | ||
when: net2NTPServers is defined | ||
|
||
- name: Create Net2 MachineConfigPool | ||
k8s: | ||
state: present | ||
definition: | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfigPool | ||
metadata: | ||
name: net2 | ||
spec: | ||
machineConfigSelector: | ||
matchExpressions: | ||
- { key: machineconfiguration.openshift.io/role, operator: In, values: [ worker, net2 ] } | ||
nodeSelector: | ||
matchLabels: | ||
node-role.kubernetes.io/net2: "" | ||
when: net2NTPServers 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