blob: 11b2371d16cda5f51d1b92789c354d8f0cfc99a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
---
- name: "Install haveged"
hosts: target
tasks:
- name: "Install haveged package"
apt:
pkg: "{{ item }}"
state: present
with_items:
- haveged
when: ansible_distribution == "Ubuntu"
- name: "Install haveged package"
yum:
name: "{{ item }}"
state: present
with_items:
- haveged
when: ansible_distribution == "RedHat" or ansible_distribution == "CentOS"
- name: "Install haveged package"
portage:
name: "{{ item }}"
state: present
with_items:
- sys-apps/haveged
when: ansible_distribution == "Gentoo"
- name: "Enable haveged"
service:
name: "{{ item.name }}"
enabled: yes
state: started
runlevel: "{{ item.runlevel }}"
with_items:
- { name: haveged, runlevel: default }
|