Move ntp setup in a role
Since base install ntp on all platforms, we can skip the vars and place it by default (next step is to convert the few playbooks duplicating the role)
This commit is contained in:
parent
3241d4c717
commit
189260776c
8 changed files with 31 additions and 24 deletions
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
dependencies:
|
||||
- { role: ntp }
|
||||
- { role: dnf-automatic }
|
||||
|
|
|
@ -300,27 +300,6 @@
|
|||
- name: Setup postfix
|
||||
include: postfix.yml
|
||||
|
||||
- name: install ntp.conf
|
||||
template: src=ntp/ntp.conf.j2 dest=/etc/ntp.conf
|
||||
tags:
|
||||
- ntp
|
||||
- config
|
||||
- base
|
||||
|
||||
- name: install ntp step-tickers
|
||||
copy: src=ntp/step-tickers dest=/etc/ntp/step-tickers
|
||||
tags:
|
||||
- ntp
|
||||
- config
|
||||
- base
|
||||
|
||||
- name: Start ntpd
|
||||
service: name=ntpd state=running enabled=true
|
||||
tags:
|
||||
- ntp
|
||||
- service
|
||||
- base
|
||||
|
||||
#
|
||||
# This task installs some common scripts to /usr/local/bin
|
||||
# scripts are under roles/base/files/common-scripts
|
||||
|
|
27
roles/ntp/tasks/main.yml
Normal file
27
roles/ntp/tasks/main.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
- name: install ntp
|
||||
package: name=ntp state=present
|
||||
tags:
|
||||
- ntp
|
||||
- package
|
||||
- base
|
||||
|
||||
- name: install ntp.conf
|
||||
template: src=ntp.conf.j2 dest=/etc/ntp.conf
|
||||
tags:
|
||||
- ntp
|
||||
- config
|
||||
- base
|
||||
|
||||
- name: install ntp step-tickers
|
||||
copy: src=step-tickers dest=/etc/ntp/step-tickers
|
||||
tags:
|
||||
- ntp
|
||||
- config
|
||||
- base
|
||||
|
||||
- name: Start ntpd
|
||||
service: name=ntpd state=running enabled=true
|
||||
tags:
|
||||
- ntp
|
||||
- service
|
||||
- base
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
dist_tag: el{{ ansible_distribution_version[0] }}
|
||||
base_pkgs_inst: [ 'ntp' ]
|
||||
base_pkgs_inst: []
|
||||
base_pkgs_erase: ['firstboot-tui','bluez-utils', 'sendmail']
|
||||
service_disabled: []
|
||||
service_enabled: []
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
dist_tag: f{{ ansible_distribution_version }}
|
||||
base_pkgs_inst: ['iptables-services', 'ntp' ]
|
||||
base_pkgs_inst: ['iptables-services' ]
|
||||
base_pkgs_erase: ['firewalld', 'PackageKit*', 'sendmail', 'at']
|
||||
service_disabled: [ ]
|
||||
service_enabled: ['auditd']
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
dist_tag: el{{ ansible_distribution_version[0] }}
|
||||
base_pkgs_inst: [ 'ntp' ]
|
||||
base_pkgs_inst: []
|
||||
base_pkgs_erase: ['firstboot-tui','bluez-utils', 'sendmail']
|
||||
service_disabled: []
|
||||
service_enabled: []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue