Moved hard coded packages to vars/, use package: module

This commit is contained in:
Bert Van Vreckem 2016-05-12 09:48:59 +02:00
parent 0eb5385cce
commit 8b3cbb232a
3 changed files with 23 additions and 7 deletions

View File

@ -5,18 +5,19 @@
with_first_found:
- "os_{{ ansible_distribution }}.yml"
- "os_{{ ansible_os_family }}.yml"
- "default.yml"
- name: Install Samba packages
action: "{{ ansible_pkg_mgr }} pkg={{ item }} state=installed"
with_items:
- samba-common
- samba
- samba-client
package:
name: "{{ item }}"
state: present
with_items: "{{ samba_packages }}"
tags: samba
- name: Install SELinux package
action: "{{ ansible_pkg_mgr }} pkg=libsemanage-python state=installed"
package:
name: "{{ item }}"
state: present
with_items: "{{ samba_selinux_packages }}"
when: ansible_selinux
- name: Make sure SELinux boolean settings are correct

View File

@ -1,4 +1,10 @@
# roles/samba/vars/os_Debian.yml
---
samba_packages:
- samba-common
- samba
- samba-client
samba_service: smbd
winbind_service: nmbd

View File

@ -1,4 +1,13 @@
# roles/samba/vars/os_RedHat.yml
---
samba_packages:
- samba-common
- samba
- samba-client
samba_selinux_packages:
- libselinux-python
samba_service: smb
winbind_service: nmb