forked from EESSI/filesystem-layer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request EESSI#37 from EESSI/host_symlinks
Add Ansible task for making symlinks to host files/directories
- Loading branch information
Showing
9 changed files
with
86 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ | |
BPREFIX: "{{ gentoo_prefix_path }}" | ||
LC_ALL: C | ||
roles: | ||
- compatibility-layer | ||
- compatibility_layer | ||
become: True |
17 changes: 0 additions & 17 deletions
17
ansible/playbooks/roles/compatibility-layer/defaults/main.yml
This file was deleted.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
ansible/playbooks/roles/compatibility_layer/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Defaults file for the compatibility layer role. | ||
--- | ||
custom_overlay_name: eessi | ||
custom_overlay_source: git | ||
custom_overlay_url: https://github.com/EESSI/gentoo-overlay.git | ||
|
||
cvmfs_start_transaction: False | ||
cvmfs_publish_transaction: False | ||
cvmfs_abort_transaction_on_failures: False | ||
cvmfs_repository: pilot.eessi-hpc.org | ||
|
||
gentoo_prefix_path: /cvmfs/pilot.eessi-hpc.org/2020.09/compat/x86_64 | ||
|
||
package_sets: | ||
- 2020.08 | ||
|
||
prefix_packages: | ||
|
||
# List of locations that should get a symlink $EPREFIX/$LOCATION -> $LOCATION. | ||
# This ensures that things like user/group ids are correct/looked up in the right way in the Prefix environment. | ||
symlinks_to_host: | ||
# required to ensure local user groups are known | ||
- /etc/group | ||
|
||
# required to ensure local users are known (see https://github.com/EESSI/compatibility-layer/issues/15) | ||
- /etc/passwd | ||
|
||
# required to ensure name-service information is taken from the right source (e.g. ldap) | ||
- /etc/nsswitch.conf | ||
|
||
# required to use the DNS resolver from the host (should be done automatically) | ||
- /etc/resolv.conf | ||
|
||
# required if Centrify is used in nsswitch.conf | ||
- /lib64/libnss_centrifydc.so.2 | ||
|
||
# required if LDAP is used in nsswitch.conf | ||
- /lib64/libnss_ldap.so.2 | ||
|
||
# required if SSSD is used in nsswitch.conf | ||
- /lib64/libnss_sss.so.2 | ||
|
||
# - /etc/hosts | ||
# - /var/lib/munge | ||
# - /var/lib/unbound | ||
# - /var/lib/VirtualGL | ||
# - /var/log/munge | ||
# - /var/log/wtmp | ||
# - /var/run | ||
# - /var/spool | ||
# - /var/tmp | ||
# - /run/dbus | ||
# - /tmp |
File renamed without changes.
26 changes: 26 additions & 0 deletions
26
ansible/playbooks/roles/compatibility_layer/tasks/create_host_symlinks.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Replace a list of files/directories in Gentoo Prefix installation by symlinks to corresponding files/directories | ||
# on the host in order to solve some common issues. | ||
--- | ||
|
||
- name: Check type of original files/directories | ||
stat: | ||
path: "{{ gentoo_prefix_path }}{{ item }}" | ||
with_items: "{{ symlinks_to_host }}" | ||
register: orig_types | ||
|
||
- name: Remove original files/directories | ||
file: | ||
path: "{{ gentoo_prefix_path }}{{ item.item }}" | ||
state: absent | ||
with_items: "{{ orig_types.results }}" | ||
when: | ||
- item.stat.exists | ||
- not item.stat.islnk | ||
|
||
- name: Make symlinks | ||
file: | ||
src: "{{ item }}" | ||
dest: "{{ gentoo_prefix_path }}{{ item }}" | ||
state: link | ||
force: yes | ||
with_items: "{{ symlinks_to_host }}" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters