Compare commits

..

No commits in common. "a57ba6a53323f92ae1adff50bb704a6fcf8d9472" and "93a68f626dba110a1a8ce96632d4591bfb33c9bc" have entirely different histories.

5 changed files with 50 additions and 36 deletions

View File

@ -1,8 +1,8 @@
--- ---
dependencies: dependencies:
- { role: ubuntu-mirror, tags: [ 'client-install' ] } - { role: ubuntu-mirror, tags: [ 'client-install' ] }
# - { role: preseed, tags: [ 'client-install' ] } - { role: preseed, tags: [ 'client-install' ] }
# - { role: ansible-pull, tags: [ 'client-install' ] } - { role: ansible-pull, tags: [ 'client-install' ] }
# - { role: doraemon, tags: [ 'client-install' ] } - { role: doraemon, tags: [ 'client-install' ] }
# - { role: npm, tags: [ 'client-install' ] } - { role: npm, tags: [ 'client-install' ] }
# - { role: git-daemon, tags: [ 'client-install' ] } - { role: git-daemon, tags: [ 'client-install' ] }

View File

@ -11,20 +11,6 @@
# SAMBA # SAMBA
- name: Checking for default SAMBA behaviour
shell: /sbin/e-smith/db configuration getprop smb HomeAdmStatus
register: check_smbbehavior
changed_when: "'enabled' not in check_smbbehavior"
ignore_errors: yes
- name: Configuring standard SAMBA behaviour on shared folders
shell: /sbin/e-smith/db configuration setprop smb HomeAdmStatus enabled InheritOwner yes ShareAdmStatus enabled
when: check_smbbehavior|changed
- name: Activating default SAMBA behaviour
shell: /sbin/e-smith/signal-event nethserver-samba-save
when: check_smbbehavior|changed
- name: "Create directory structure for templates-custom" - name: "Create directory structure for templates-custom"
file: file:
path: "/etc/e-smith/templates-custom/etc/samba/smb.conf" path: "/etc/e-smith/templates-custom/etc/samba/smb.conf"
@ -32,7 +18,7 @@
group: root group: root
mode: 0755 mode: 0755
state: directory state: directory
register: check_tempcust when: check_tempcust|changed
- name: "Copying settings from default." - name: "Copying settings from default."
copy: copy:
@ -52,21 +38,41 @@
insertafter: EOF insertafter: EOF
when: check_tempcust|changed when: check_tempcust|changed
- name: Adding server signing as mandatory #- name: Adding server signing as mandatory
lineinfile: # lineinfile:
dest: /etc/e-smith/templates-custom/etc/samba/smb.conf/10global # dest: /etc/e-smith/templates-custom/etc/samba/smb.conf/10global
line: "server signing = mandatory" # line: "server signing = mandatory"
state: present # insertafter: "^workgroup = "
insertafter: EOF # state: present
when: check_tempcust|changed # when: check_tempcust|changed
- name: Applying custom configurations to running SAMBA #- name: Checking SMB configuration
shell: /sbin/e-smith/signal-event nethserver-samba-save # shell: /sbin/e-smith/db configuration printprop smb RoamingProfiles
become: yes # register: chk_smb
when: check_tempcust|changed # changed_when: "'RoamingProfiles=yes' not in chk_smb.stdout"
# ignore_errors: true
#- name: Configuring SMB
# shell: /sbin/e-smith/db configuration setprop smb RoamingProfiles yes ServerRole PDC Workgroup "{{ ansible_local.domain.domainshort }}" status enabled
# when: chk_smb|changed
#
#- name: Activating SMB
# shell: /sbin/e-smith/signal-event nethserver-samba-save
# when: chk_smb|changed
# ibays # ibays
#- name: Enabling SMB services restart when managing ibays
# file:
# src: reload
# dest: "{{ item }}/smb"
# state: link
# force: yes
# with_items:
# - /etc/e-smith/events/ibay-delete/services2adjust
# - /etc/e-smith/events/ibay-create/services2adjust
# - /etc/e-smith/events/ibay-modify/services2adjust
- name: Checking for shared ibay - name: Checking for shared ibay
shell: /sbin/e-smith/db accounts show shared shell: /sbin/e-smith/db accounts show shared
ignore_errors: true ignore_errors: true
@ -101,7 +107,7 @@
# when: force_ibay_shared|bool or chk_shared|failed # when: force_ibay_shared|bool or chk_shared|failed
- name: Configuring shared ibay - name: Configuring shared ibay
shell: /sbin/e-smith/db accounts set shared ibay AclRead "" AclWrite "" Description "Cartella condivisa" GroupAccess rw OtherAccess "" OwningGroup "domain users@{{ ansible_local.domain.domainfull }}" SmbAuditStatus enabled SmbGuestAccessType none SmbRecycleBinStatus enabled SmbRecycleBinVersionsStatus enabled SmbShareBrowseable enabled shell: /sbin/e-smith/db accounts set shared ibay AclRead "domain users@{{ ansible_local.domain.domainfull }}" AclWrite "domain users@{{ ansible_local.domain.domainfull }}" Description "Cartella condivisa" GroupAccess rw OtherAccess "" OwningGroup "domain admins@{{ ansible_local.domain.domainfull }}" SmbAuditStatus enabled SmbGuestAccessType none SmbRecycleBinStatus enabled SmbRecycleBinVersionsStatus enabled SmbShareBrowseable enabled
when: chk_shared|failed when: chk_shared|failed
- name: Activating shared ibay - name: Activating shared ibay
@ -113,6 +119,11 @@
# shell: /sbin/e-smith/db accounts setprop shared SmbProfileType shared # shell: /sbin/e-smith/db accounts setprop shared SmbProfileType shared
# become: yes # become: yes
# when: force_ibay_shared|bool or chk_shared|failed # when: force_ibay_shared|bool or chk_shared|failed
#
#- name: Saving new version of smb.conf
# shell: /sbin/e-smith/signal-event nethserver-samba-save
# become: yes
# when: check_tempcust|changed
#- name: Forcing regeneration of smb.conf #- name: Forcing regeneration of smb.conf
# shell: /sbin/e-smith/signal-event nethserver-samba-update # shell: /sbin/e-smith/signal-event nethserver-samba-update

View File

@ -1,7 +1,10 @@
--- ---
# TFTP # TFTP
# TFTP is included in DHCP module in NethServer 7 - name: Installing TFTP
yum:
name: nethserver-tftp
state: present
- name: Checking TFTP configuration - name: Checking TFTP configuration
shell: /sbin/e-smith/db configuration getprop dnsmasq dhcp-boot shell: /sbin/e-smith/db configuration getprop dnsmasq dhcp-boot
@ -10,7 +13,7 @@
ignore_errors: yes ignore_errors: yes
- name: Configuring TFTP - name: Configuring TFTP
shell: /sbin/e-smith/db configuration setprop dnsmasq dhcp-boot pxelinux.0 shell: /sbin/e-smith/db configuration setprop dnsmasq tftp-status enabled dhcp-boot pxelinux.0
when: chk_tftp_enabled|changed when: chk_tftp_enabled|changed
- name: Activating tftp - name: Activating tftp

View File

@ -15,7 +15,7 @@
- eth1 - eth1
- name: Configuring new external interface - name: Configuring new external interface
shell: "/sbin/e-smith/db networks set {{ extnic }} ethernet bootproto dhcp device {{ extnic }} hwaddr {{ ansible_eth0.macaddress }} onboot yes role red" shell: "/sbin/e-smith/db networks set {{ extnic }} ethernet bootproto dhcp device {{ extnic }} hwaddr {{ ansible_eth0.macaddress }} onboot yes peerdns yes role red"
become: yes become: yes
- name: Configuring new internal interface - name: Configuring new internal interface

View File

@ -4,4 +4,4 @@
roles: roles:
- setup - setup
- nethcfg - nethcfg
- client-install #- client-install