JIRA: -
Set "security_ntp_servers" to use only one server;
Correct the path of chrony key for centos deployment.
Change-Id: I3050018fe07c51912e0b52a1c5c7ce2dd4d3f6ce
Signed-off-by: Yifei Xue <xueyifei@huawei.com>
delay: 10
when: hostvars[hostvars[inventory_hostname]['groups']['controller'][0]]['local_mirror'] == 'CentOS'
+- name: update the directory of chrony key
+ lineinfile:
+ dest: /etc/ansible/roles/ansible-hardening/templates/chrony.conf.j2
+ regexp: '^keyfile'
+ line: 'keyfile /etc/chrony.keys'
+ when: hostvars[hostvars[inventory_hostname]['groups']['controller'][0]]['local_mirror'] == 'CentOS'
+
- name: add mariadb local repository
blockinfile:
dest: /etc/openstack_deploy/user_variables.yml
{% endif %}
security_sshd_permit_root_login: yes
+
+security_ntp_servers:
+ - 45.79.111.114
dest: /etc/modules-load.d/openstack-ansible.conf
- name: restart ntp service
- shell: "systemctl enable ntpd.service && systemctl start ntpd.service"
+ shell: |
+ systemctl stop ntpd.service;
+ systemctl disable ntpd.service;
- name: change the MaxSessions
lineinfile:
state: absent
- name: restart ntp service
- shell: "service ntp restart"
+ shell: |
+ service ntp stop;
+ systemctl disable ntp;
- name: add the appropriate kernel modules
copy: