mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-01 14:02:12 +08:00
34 lines
739 B
YAML
34 lines
739 B
YAML
---
|
|
#install denyhosts
|
|
- name: install denyhosts (yum)
|
|
yum: name=denyhosts state=present
|
|
tags:
|
|
- packages
|
|
when: ansible_distribution_major_version|int < 22
|
|
|
|
- name: install denyhosts (dnf)
|
|
dnf: name=denyhosts state=present
|
|
tags:
|
|
- packages
|
|
when: ansible_distribution_major_version|int > 21 and ansible_cmdline.ostree is not defined
|
|
|
|
- name: /etc/denyhosts.conf
|
|
copy: src=denyhosts.conf dest=/etc/denyhosts.conf
|
|
notify:
|
|
- restart denyhosts
|
|
tags:
|
|
- config
|
|
|
|
- name: /var/lib/denyhosts/allowed-hosts
|
|
copy: src=allowed-hosts dest=/var/lib/denyhosts/allowed-hosts
|
|
notify:
|
|
- restart denyhosts
|
|
tags:
|
|
- config
|
|
|
|
- name: enable the service
|
|
service: name=denyhosts state=running enabled=true
|
|
tags:
|
|
- service
|
|
|