Last active
March 16, 2021 03:50
-
-
Save ralvares/004a8e6bc5d376ba1dbd0e9d23dbab7e to your computer and use it in GitHub Desktop.
ntp on ocp4
This file contains hidden or 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
| chronybase64=$(cat << EOF | base64 -w 0 | |
| server 0.fi.pool.ntp.org iburst | |
| server 1.fi.pool.ntp.org iburst | |
| server 2.fi.pool.ntp.org iburst | |
| server 3.fi.pool.ntp.org iburst | |
| driftfile /var/lib/chrony/drift | |
| makestep 1.0 3 | |
| rtcsync | |
| keyfile /etc/chrony.keys | |
| leapsectz right/UTC | |
| logdir /var/log/chrony | |
| EOF | |
| ) | |
| cat << EOF > 50-worker-chrony.yaml | |
| apiVersion: machineconfiguration.openshift.io/v1 | |
| kind: MachineConfig | |
| metadata: | |
| labels: | |
| machineconfiguration.openshift.io/role: worker | |
| name: 50-worker-chrony | |
| spec: | |
| config: | |
| ignition: | |
| version: 3.1.0 | |
| storage: | |
| files: | |
| - contents: | |
| source: data:text/plain;charset=utf-8;base64,${chronybase64} | |
| filesystem: root | |
| mode: 0644 | |
| overwrite: true | |
| path: /etc/chrony.conf | |
| EOF | |
| cat << EOF > 50-master-chrony.yaml | |
| apiVersion: machineconfiguration.openshift.io/v1 | |
| kind: MachineConfig | |
| metadata: | |
| labels: | |
| machineconfiguration.openshift.io/role: master | |
| name: 50-master-chrony | |
| spec: | |
| config: | |
| ignition: | |
| version: 3.1.0 | |
| storage: | |
| files: | |
| - contents: | |
| source: data:text/plain;charset=utf-8;base64,${chronybase64} | |
| filesystem: root | |
| mode: 0644 | |
| overwrite: true | |
| path: /etc/chrony.conf | |
| EOF | |
| oc apply -f 50-worker-chrony.yaml | |
| oc apply -f 50-master-chrony.yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment