diff --git a/inventories/group_vars/all.yml b/inventories/group_vars/all.yml index 15c4414..314dfcf 100644 --- a/inventories/group_vars/all.yml +++ b/inventories/group_vars/all.yml @@ -44,3 +44,7 @@ all: 62663735663834613033633032613763376462346333343165653538383038633762636337316361 3738663863333931390a623839383165643363393537306635343237656337356534623036616465 6532 + ntp_servers: + - "ntp1.jst.mfeed.ad.jp" + - "ntp2.jst.mfeed.ad.jp" + - "ntp3.jst.mfeed.ad.jp" diff --git a/requirements.yml b/requirements.yml index dbb9096..5035f32 100644 --- a/requirements.yml +++ b/requirements.yml @@ -4,6 +4,7 @@ roles: - name: compscidr.gpg - name: geerlingguy.docker - name: geerlingguy.jenkins + - name: geerlingguy.ntp - name: mrlesmithjr.netplan src: https://github.com/mrlesmithjr/ansible-netplan version: 'f0167f5' diff --git a/tasks/all/main.yml b/tasks/all/main.yml index 225510b..2063dfb 100644 --- a/tasks/all/main.yml +++ b/tasks/all/main.yml @@ -25,6 +25,12 @@ ansible.builtin.import_tasks: file: tasks/all/set-locale.yml +- name: "Common / Set NTP" + ansible.builtin.import_tasks: + file: tasks/all/ntp.yml + tags: + - ntp + - name: "Common / Put authorized Key for hayato" ansible.builtin.import_tasks: file: tasks/all/authorized_keys.yml diff --git a/tasks/all/ntp.yml b/tasks/all/ntp.yml new file mode 100644 index 0000000..2ed2073 --- /dev/null +++ b/tasks/all/ntp.yml @@ -0,0 +1,10 @@ +--- +- name: "Common / NTP Setting" + ansible.builtin.import_role: + name: geerlingguy.ntp + vars: + ntp_enabled: true + ntp_timezone: "Asia/Tokyo" + ntp_servers: "{{ all.vars.ntp_servers }}" + ntp_tinker_panic: true + ntp_manage_config: true