Comments (4)
We could just skip all the *extracted*
directories when setting file permissions and ownership. At the time when the file and directory permissions are set by the role, permissions and ownership only of files which are not already extracted will have to be modified.
from community.sap_install.
@berndfinger I would suggest different approach. It is easier to create batches of 100 files and run them in loop.
This is short example I made for test, which splits into batches of 3:
vars:
file_input: "fileA fileB fileC fileD fileE fileF fileG fileX"
tasks:
- name: Assign file_input into file_list
ansible.builtin.set_fact:
file_list: "{{ file_input.split(' ') }}"
- name: Show file_list in loop per batch
ansible.builtin.debug:
msg: "{{ item | join(' ') }}"
loop: "{{ file_list | batch(3) }}"
loop_control:
label: "Batch {{ (file_list.index(item[0]) // 3) + 1 }}"
TASK [Show file_list in loop per batch] *********************************************************************************************************************
ok: [localhost] => (item=Batch 1) => {
"msg": "fileA fileB fileC"
}
ok: [localhost] => (item=Batch 2) => {
"msg": "fileD fileE fileF"
}
ok: [localhost] => (item=Batch 3) => {
"msg": "fileG fileX"
}
from community.sap_install.
@marcelmamula Nice idea, thanks! I tested with a batch size of 100, a directory name of length 100, and several 1000 files with a 22 character file name. I would still skip the extracted directories, as there should never be any need to change owners and permissions of extracted files.
from community.sap_install.
Solved in #735.
from community.sap_install.
Related Issues (20)
- collection: Add SPDX headers to all files of the collection HOT 2
- sap_install_media_detect: reduce stdout with loop labels HOT 1
- sap_hana_preconfigure/RHEL: Set net.core.somaxconn only for RHEL <= 8.7
- sap_general_preconfigure: The strict DNS check enforcement of PR 765 causes failures in certain cloud environments HOT 4
- sap_hana_install : SAP HANA Checks - Fail if the user 'sidadm' exists HOT 2
- sap_hana_install: Do not fail if sap_hana_install_common_master_password is not set. HOT 1
- sap_hana_preconfigure/SLES: sap_hana_preconfigure_update needs validation/wait HOT 1
- sap_swpm: unhandled exception when using sap_swpm_swpm_observer_mode...
- sap_hana_preconfigure/RHEL: tsx kernel parameters not set for RHEL9 HOT 2
- sap_hana/sap_swpm: Linux Special Characters HOT 2
- sap_storage_setup: README.MD example is wrong, please fix it.
- sap_hana_install: Use polling for hdblcm HOT 1
- collection: Fix 'yaml[octal-values]'
- sap_hana_preconfigure/RHEL/NetApp: Sync with SAP note 3024346 v.10 HOT 2
- sap_hana_preconfigure/RHEL/NetApp: Ensure two NetApp related kernel parameters are not present in file sap_hana.conf
- sap_hana_preconfigure/SLES: Remove default saptune version in readme
- sap_hana_preconfigure/SLES: Update azure override readme and conditional
- sap_swpm: Reduce the amount of empty lines in inifile.params
- collection: Synchronize all .yamllint.yml files
- sap_general_preconfigure/RHEL: Add FQCN to include_role tasks HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from community.sap_install.