From 581f7c74d52e296d2203a9910318c3c0f131f17d Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 1 Jul 2021 17:14:16 +0200 Subject: [PATCH] Setup the /etc/idmapd.conf file --- defaults/main.yml | 6 ++++++ tasks/autofs.yml | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index d21f968..900782f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -11,12 +11,18 @@ locales_list: - { name: 'it_IT.UTF-8' } - { name: 'it_IT' } +domain_name: '{{ ansible_domain }}' # # Define the following variables to manage additional disks and mount points, even static nfs ones additional_disks: False disks_and_mountpoints_list: [] # - { mountpoint: '/data', device: 'xvda3', fstype: 'xfs', opts: 'noatime', state: 'mounted', create_filesystem: True } +idmap_verbosity: 0 +idmap_conf_options: + - { section: 'General', option: 'Domain', value: '{{ domain_name }}', state: 'present' } + - { section: 'General', option: 'Verbosity', value: '{{ idmap_verbosity }}', state: 'present' } + # autofs mount points autofs_client_mountpoint: False autofs_conf_options: diff --git a/tasks/autofs.yml b/tasks/autofs.yml index 3186dcf..f94e61d 100644 --- a/tasks/autofs.yml +++ b/tasks/autofs.yml @@ -21,6 +21,19 @@ file: dest={{ item.mountpoint_prefix }} state=directory owner=root group=root mode=0755 with_items: '{{ autofs_maps }}' + - name: setup idmap.conf + ini_file: + path: /etc/idmapd.conf + section: '{{ item.section }}' + option: '{{ item.option }}' + value: '{{ item.value }}' + state: '{{ item.state }}' + owner: 'root' + group: 'root' + mode: '0644' + create: no + loop: '{{ idmap_conf_options }}' + - name: setup autofs.conf ini_file: path: /etc/autofs.conf