Skip to content

Commit

Permalink
fix: 修复 public network node chronyd config
Browse files Browse the repository at this point in the history
  • Loading branch information
ss75710541 committed Apr 22, 2022
1 parent 1c7958c commit 0d3bff5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/host-init/tasks/apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- ca-certificates
- gnupg
- lsb-release
- network-manager
update_cache: yes
tags: install-base-tools

3 changes: 3 additions & 0 deletions roles/host-init/tasks/publicInterface.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- name: Enabled NetworkManager
service: name=NetworkManager state=started enabled=yes

- name: Configure the public network card
shell: nmcli connection add type tun ifname pip0 con-name pip0 mode tap ip4 {{ advertise_address }}/24
tags: publicNetwork
4 changes: 4 additions & 0 deletions roles/host-init/templates/chrony.client.conf.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{% if public_network_node %}
server {{ master_vip_advertise_address }} minpoll 4 maxpoll 10 iburst
{% else %}
server {{ master_vip }} minpoll 4 maxpoll 10 iburst
{% endif %}
driftfile /var/lib/chrony/drift
makestep 10 3
rtcsync
Expand Down

0 comments on commit 0d3bff5

Please sign in to comment.