Moved hard coded packages to vars/, use package: module
This commit is contained in:
parent
0eb5385cce
commit
8b3cbb232a
@ -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
|
||||
|
@ -1,4 +1,10 @@
|
||||
# roles/samba/vars/os_Debian.yml
|
||||
---
|
||||
|
||||
samba_packages:
|
||||
- samba-common
|
||||
- samba
|
||||
- samba-client
|
||||
|
||||
samba_service: smbd
|
||||
winbind_service: nmbd
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user