From 93deeeef5bd663f4931afc38e25d46a7bb7e7147 Mon Sep 17 00:00:00 2001 From: Stanislav Popov Date: Mon, 19 Jun 2017 10:15:08 +0500 Subject: [PATCH] feat: centos support --- molecule.yml | 5 +++++ tasks/main.yml | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/molecule.yml b/molecule.yml index c9705a9..58276d1 100644 --- a/molecule.yml +++ b/molecule.yml @@ -8,6 +8,11 @@ docker: image_version: 16.04 volume_mounts: - ${MOLECULE_APTPROXY_PATH}:/etc/apt/apt.conf.d/00aptproxy + - name: ansible-role-server-scripts-centos-7 + image: centos + image_version: 7 + volume_mounts: + - ${MOLECULE_APTPROXY_PATH}:/etc/apt/apt.conf.d/00aptproxy ansible: playbook: tests/playbook.yml diff --git a/tasks/main.yml b/tasks/main.yml index 7215e0b..e6ee956 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,12 +1,23 @@ --- -- name: Ensure cron and git installed +- name: Ensure cron and git installed (Debian) apt: name: "{{ item }}" state: present with_items: - cron - git + when: ansible_os_family == 'Debian' + tags: [ server-scripts, install ] + +- name: Ensure cron and git installed (RedHat) + package: + name: "{{ item }}" + state: present + with_items: + - crontabs + - git + when: ansible_os_family == 'RedHat' tags: [ server-scripts, install ] - name: Sync server-scripts