This was added as a workaround because systemd didn't work correctly
on CentOS 7 systems when we originally added this test. This is no
longer the case so remove this workaround and apply systemd ansible
task for CentOS systems as for some reason the "service" task fails
on CentOS systems.
Change-Id: I6deeaec74d78cf1afdd4dbea42a1ff48875f2669
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
---
-haveged_service_enable: true
platforms:
- name: centos7
image: centos:7
- groups:
- - centos
- name: ubuntu1604
image: ubuntu:16.04
provisioner:
name: ansible
- inventory:
- group_vars:
- centos:
- haveged_service_enable: false
scenario:
name: default
verifier:
---
- name: Prepare
hosts: all
- gather_facts: false
- tasks: []
+ gather_facts: true
+ tasks:
+ - name: Update APT cache
+ apt:
+ update_cache: yes
+ when: ansible_distribution == 'Ubuntu'
+ become: true
become: true
- name: Enable haveged service
- service: name=haveged enabled=yes
- when: haveged_service_enable | bool
+ systemd:
+ name: haveged
+ enabled: yes
become: true