Fix #37 by removing inconsistencies in variable naming of
`samba_homes_include`
This commit is contained in:
parent
ce95f7adfb
commit
03a1920252
@ -39,7 +39,7 @@ No specific requirements
|
||||
| `samba_domain_master` | true | When true, smbd enables WAN-wide browse list collation |
|
||||
| `samba_global_include` | - | Samba-compatible configuration file with options to be loaded to [global] section (see below) |
|
||||
| `samba_guest_account` | - | Guest account for unknown users |
|
||||
| `samba_home_include` | - | Samba-compatible configuration file with options to be loaded to [home] section (see below) |
|
||||
| `samba_homes_include` | - | Samba-compatible configuration file with options to be loaded to [homes] section (see below) |
|
||||
| `samba_interfaces` | [] | List of network interfaces used for browsing, name registration, etc. |
|
||||
| `samba_load_homes` | false | When true, user home directories are accessible. |
|
||||
| `samba_load_printers` | false | When true, printers attached to the host are shared |
|
||||
@ -174,7 +174,7 @@ The values for `valid_users` and `write_list` should be a comma separated list o
|
||||
|
||||
## Adding arbitrary configuration files
|
||||
|
||||
You can add settings that are not supported by this role out-of-the-box through custom configuration files that will be included from the main configuration file. There are three types of include files: for the global section, for the homes section, and for individual shares. Put your custom configuration files in a subdirectory `templates`, relative to your master playbook location. Then, specify them in the variables `samba_global_include`, `samba_home_include`, or `include_file` in the `samba_shares` definition.
|
||||
You can add settings that are not supported by this role out-of-the-box through custom configuration files that will be included from the main configuration file. There are three types of include files: for the global section, for the homes section, and for individual shares. Put your custom configuration files in a subdirectory `templates`, relative to your master playbook location. Then, specify them in the variables `samba_global_include`, `samba_homes_include`, or `include_file` in the `samba_shares` definition.
|
||||
|
||||
Your custom configuration files are considered to be Jinja templates, so you can use Ansible variables inside them. The configuration files will be validated to ensure they are syntactically correct.
|
||||
|
||||
|
@ -94,8 +94,9 @@
|
||||
when: samba_global_include is defined
|
||||
notify:
|
||||
- Restart Samba services
|
||||
tags: samba
|
||||
|
||||
- name: Install homes include file
|
||||
- name: Install home include file
|
||||
template:
|
||||
src: "{{ samba_homes_include }}"
|
||||
dest: "{{ samba_configuration_dir }}"
|
||||
@ -103,6 +104,7 @@
|
||||
when: samba_homes_include is defined
|
||||
notify:
|
||||
- Restart Samba services
|
||||
tags: samba
|
||||
|
||||
- name: Install share specific include files
|
||||
template:
|
||||
@ -113,6 +115,7 @@
|
||||
notify:
|
||||
- Restart Samba services
|
||||
with_items: "{{ samba_shares }}"
|
||||
tags: samba
|
||||
|
||||
- name: Create username map file if needed
|
||||
template:
|
||||
@ -120,8 +123,8 @@
|
||||
src: smbusers.j2
|
||||
notify:
|
||||
- Restart Samba services
|
||||
tags: samba
|
||||
when: samba_username_map is defined
|
||||
tags: samba
|
||||
|
||||
- name: Start Samba service(s)
|
||||
service:
|
||||
|
4
templates/smb.conf.j2
Executable file → Normal file
4
templates/smb.conf.j2
Executable file → Normal file
@ -90,8 +90,8 @@
|
||||
writable = yes
|
||||
{% endif %}
|
||||
|
||||
{% if samba_home_include is defined %}
|
||||
include = {{ samba_configuration_dir }}/{{ samba_home_include }}
|
||||
{% if samba_homes_include is defined %}
|
||||
include = {{ samba_configuration_dir }}/{{ samba_homes_include }}
|
||||
{% endif %}
|
||||
|
||||
{% if samba_shares|length > 0 %}
|
||||
|
Loading…
Reference in New Issue
Block a user