inspec/examples/kitchen-ansible/tasks/main.yml

17 lines
612 B
YAML
Raw Normal View History

2015-11-28 08:20:58 +00:00
---
- name: create nginx yum repo if OS family is RedHat
copy: src=nginx.repo dest=/etc/yum.repos.d/
owner=root group=root mode=0644
when: (ansible_os_family == "RedHat" and ansible_distribution_major_version == "7")
- name: ensure nginx is at the latest version if OS family is RedHat
yum: name=nginx state=latest
when: ansible_os_family == "RedHat"
- name: ensure nginx is at the latest version if OS family is Debian
apt: name=nginx state=latest
when: ansible_os_family == "Debian"
- name: ensure nginx is running (and enable it at boot)
service: name=nginx state=started enabled=yes