updates to samba roles
todo: set samba acl - currently manual via compmgmt.msc todo: dynamic dns update?
This commit is contained in:
@@ -8,7 +8,18 @@
|
||||
# Samba is the standard Windows interoperability
|
||||
# suite of programs for Linux and Unix.
|
||||
#
|
||||
|
||||
- name: update hosts file
|
||||
become: true
|
||||
blockinfile:
|
||||
dest: /etc/hosts
|
||||
content: "{{ lookup('template', '{{ role_path }}/templates/hosts.j2') }}"
|
||||
state: present
|
||||
tags: update_hosts
|
||||
- name: set hostname
|
||||
become: true
|
||||
hostname:
|
||||
name: '{{ inventory_hostname }}'
|
||||
tags: set_hostname
|
||||
- name: "IFor OS: Ubuntu 20.04LTS, Arch: amd64"
|
||||
import_tasks: ubt-2004-amd64.yml
|
||||
when:
|
||||
@@ -26,3 +37,35 @@
|
||||
when:
|
||||
- ansible_distribution_version == "18.04"
|
||||
- ansible_architecture == "x86_64"
|
||||
|
||||
- name: "Check that {{ public_share_path }} exist"
|
||||
stat:
|
||||
path: "{{ public_share_path }}"
|
||||
register: public_dir_exists
|
||||
|
||||
- name: "Create {{ public_share_path }} directory"
|
||||
become: yes
|
||||
file:
|
||||
state: directory
|
||||
path: "{{ public_share_path }}"
|
||||
owner: nobody
|
||||
group: nogroup
|
||||
mode: 0755
|
||||
recurse: yes
|
||||
when: public_dir_exists.stat.exists == False
|
||||
|
||||
- name: "Check that {{ private_share_path }} exist"
|
||||
stat:
|
||||
path: "{{ private_share_path }}"
|
||||
register: private_dir_exists
|
||||
|
||||
- name: "Create {{ private_share_path }} directory"
|
||||
become: yes
|
||||
file:
|
||||
state: directory
|
||||
path: "{{ private_share_path }}"
|
||||
owner: root
|
||||
group: "{{ samba_group_name }}"
|
||||
mode: 1770
|
||||
when: private_dir_exists.stat.exists == False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user