32 lines
937 B
YAML
32 lines
937 B
YAML
- hosts: all
|
|
|
|
pre_tasks:
|
|
- name: Update apt cache.
|
|
apt: update_cache=yes cache_valid_time=600
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
- name: Ensure build dependencies are installed (RedHat).
|
|
yum: 'name="{{ item }}" state=present'
|
|
with_items:
|
|
- openssh-server
|
|
- openssh-clients
|
|
when: ansible_os_family == 'RedHat'
|
|
|
|
- name: Ensure build dependencies are installed (Debian).
|
|
apt: 'name="{{ item }}" state=present'
|
|
with_items:
|
|
- openssh-server
|
|
- openssh-client
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
- name: Ensure auth.log file is present.
|
|
copy:
|
|
dest: /var/log/auth.log
|
|
content: ""
|
|
force: no
|
|
when: >
|
|
(ansible_distribution == 'Ubuntu' and ansible_distribution_version == '14.04') or
|
|
(ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie')
|
|
|
|
roles:
|
|
- role_under_test
|