dell / dellemc-openmanage-ansible-modules

Dell OpenManage Ansible Modules
GNU General Public License v3.0
340 stars 164 forks source link

[BUG]: File copy/access issue during idrac_os_deployment kickstart part #514

Closed es1lenter closed 1 year ago

es1lenter commented 1 year ago

Bug Description

When running the playbook, everything seems to go fine until it gets to copy some files. I have tried to run it with and without become: true and am getting similar results. Both scenario logs are included.

I am still learning and this is basically the first playbook i have chopped together for playing around so please ignore that i have all the variables in the playbook, not separate.

Component or Module Name

idrac_os_deployment

Ansible Version

2.15.1

Python Version

3.9.16

iDRAC/OME/OME-M version

iDRAC 7.00.00.00

Operating System

Rocky Linux 9.2

Playbook Used

Logs

With become: true

TASK [dellemc.openmanage.idrac_os_deployment : Report task failure] ************************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/main.yml:65 fatal: [X.X.X.X]: FAILED! => { "failed_when_result": true, "idrac_os_deployment_failure": { "changed": false, "exception": "Traceback (most recent call last):\n File \"/home/myuser/.local/lib/python3.9/site-packages/ansible/plugins/action/copy.py\", line 466, in run\n source = self._find_needle('files', source)\n File \"/home/myuser/.local/lib/python3.9/site-packages/ansible/plugins/action/__init__.py\", line 1455, in _find_needle\n return self._loader.path_dwim_relative_stack(path_stack, dirname, needle)\n File \"/home/myuser/.local/lib/python3.9/site-packages/ansible/parsing/dataloader.py\", line 341, in path_dwim_relative_stack\n raise AnsibleFileNotFound(file_name=source, paths=[to_native(p) for p in search])\nansible.errors.AnsibleFileNotFound: Could not find or access '/tmp/omam_osdan1rzd2h/kickstart_ESXI_X.X.X.X.cfg' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option\n", "failed": true, "failed_task_name": "Copy KS file to extracted directory", "invocation": { "dest": "/tmp/omam_osdan1rzd2h/extract/KS.CFG", "mode": "0744", "module_args": { "dest": "/tmp/omam_osdan1rzd2h/extract/KS.CFG", "mode": "0744", "src": "/tmp/omam_osdan1rzd2h/kickstart_ESXI_X.X.X.X.cfg" }, "src": "/tmp/omam_osdan1rzd2h/kickstart_ESXI_X.X.X.X.cfg" }, "msg": "Could not find or access '/tmp/omam_osdan1rzd2h/kickstart_ESXI_X.X.X.X.cfg' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option" } }

Without become: true

`TASK [dellemc.openmanage.idrac_os_deployment : Append ks path to the linux boot menu] **** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/esxi/compile_iso.yml:9

ESTABLISH LOCAL CONNECTION FOR USER: myuser EXEC /bin/sh -c 'echo ~myuser && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/myuser/.ansible/tmp `"&& mkdir "` echo /home/myuser/.ansible/tmp/ansible-tmp-1690445270.4359188-1858013-196186863923399 `" && echo ansible-tmp-1690445270.4359188-1858013-196186863923399="` echo /home/myuser/.ansible/tmp/ansible-tmp-1690445270.4359188-1858013-196186863923399 `" ) && sleep 0' Using module file /home/myuser/.local/lib/python3.9/site-packages/ansible/modules/lineinfile.py PUT /home/myuser/.ansible/tmp/ansible-local-1856648k75z5x5j/tmpfx35d9bn TO /home/myuser/.ansible/tmp/ansible-tmp-1690445270.4359188-1858013-196186863923399/AnsiballZ_lineinfile.py EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690445270.4359188-1858013-196186863923399/ /home/myuser/.ansible/tmp/ansible-tmp-1690445270.4359188-1858013-196186863923399/AnsiballZ_lineinfile.py && sleep 0' EXEC /bin/sh -c '/usr/bin/python3 /home/myuser/.ansible/tmp/ansible-tmp-1690445270.4359188-1858013-196186863923399/AnsiballZ_lineinfile.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/myuser/.ansible/tmp/ansible-tmp-1690445270.4359188-1858013-196186863923399/ > /dev/null 2>&1 && sleep 0' The full traceback is: Traceback (most recent call last): File "/tmp/ansible_ansible.builtin.lineinfile_payload_zzzkdvos/ansible_ansible.builtin.lineinfile_payload.zip/ansible/module_utils/basic.py", line 1700, in atomic_move os.rename(b_src, b_dest) OSError: [Errno 18] Invalid cross-device link: b'/home/myuser/.ansible/tmp/ansible-tmp-1690445270.4359188-1858013-196186863923399/tmpjfbni7pj' -> b'/tmp/omam_osdx98l7y3m/extract/EFI/BOOT/BOOT.CFG' failed: [X.X.X.X -> localhost] (item=/tmp/omam_osdx98l7y3m/extract/EFI/BOOT/BOOT.CFG) => { "ansible_loop_var": "item", "changed": false, "invocation": { "module_args": { "attributes": null, "backrefs": false, "backup": false, "create": false, "firstmatch": false, "group": null, "insertafter": null, "insertbefore": null, "line": "kernelopt=runweasel ks=cdrom:/KS.CFG", "mode": null, "owner": null, "path": "/tmp/omam_osdx98l7y3m/extract/EFI/BOOT/BOOT.CFG", "regexp": "^kernelopt=", "search_string": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "state": "present", "unsafe_writes": false, "validate": null } }, "item": "/tmp/omam_osdx98l7y3m/extract/EFI/BOOT/BOOT.CFG", "msg": "The destination directory (/tmp/omam_osdx98l7y3m/extract/EFI/BOOT) is not writable by the current user. Error was: [Errno 13] Permission denied: b'/tmp/omam_osdx98l7y3m/extract/EFI/BOOT/.ansible_tmp7a4ihbglBOOT.CFG'" } ` ### Steps to Reproduce Run the playbook ### Expected Behavior Successfully copies the file and does the changes in KS ### Actual Behavior Does not copy the kickstart file / access the file to continue with creating the ISO ### Screenshots _No response_ ### Additional Information my user has rights to sudo and i do believe that tmp folder should have pretty relaxed rights in general.
es1lenter commented 1 year ago

Hi Sachin and thanks for your response to my issue!

I have now tested with the example playbooks, i changed the variables in osd.yml and credentials.yml and modified the inventory file and ran the playbook from the roles/idrac_os_deployment folder with ansible-playbook -i ../inventory idractest.yml and ended up with the same tmp folder write error like in the playbook(s) i tested originally.

On Thu, 27 Jul 2023 at 11:55, Sachin Apagundi @.***> wrote:

@es1lentr https://github.com/es1lentr Thanks for reporting the bug, while we take a look at the bug, Can you please try using Role: idrac_os_deployment

https://github.com/dell/dellemc-openmanage-ansible-modules/tree/collections/roles/idrac_os_deployment example playbook and vars on how to run a role is here https://github.com/dell/dellemc-openmanage-ansible-modules/blob/collections/playbooks/roles/idrac_os_deployment/idrac_os_deployment.yml Let me know if any.

— Reply to this email directly, view it on GitHub https://github.com/dell/dellemc-openmanage-ansible-modules/issues/514#issuecomment-1653287830, or unsubscribe https://github.com/notifications/unsubscribe-auth/APWHVEVCA7X4YMB6XVTNWNTXSI3I3ANCNFSM6AAAAAA2ZWLT2U . You are receiving this because you were mentioned.Message ID: @.***>

sachin-apa commented 1 year ago

Got it .. !! I see that when you run without become: true its failing when it tries to write kickstart file path to the boot file and I see that when you run with become: true its failing when it tries to copy the generated kickstart file and it doesn't exists. Definitely there is a permission issue when you run without become: true from the logs. Is it possible to attach the complete logs by running in debug mode -vvv with become:true , do please filter/replace the info like IP and other data as required.

es1lenter commented 1 year ago

Hi @sachin-apa - here's the output with become: true I'm just a bit baffled as it's just the tmp folder. Maybe when the iso is being extracted, it won't sort out the folder/file rights of the extracted folders/files and that's why it's messy.

`[myuser@myuserdev ansibleplayground]$ ansible-playbook -i /home/myuser/gitrepos/ansibleplayground/ansibleplayground/hosts idrac_osdeploy2.yml -vvv ansible-playbook [core 2.15.1] config file = /etc/ansible/ansible.cfg configured module search path = ['/home/myuser/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/myuser/.local/lib/python3.9/site-packages/ansible ansible collection location = /home/myuser/.ansible/collections:/usr/share/ansible/collections executable location = /home/myuser/.local/bin/ansible-playbook python version = 3.9.16 (main, May 29 2023, 00:00:00) [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)] (/usr/bin/python3) jinja version = 3.1.2 libyaml = True Using /etc/ansible/ansible.cfg as config file host_list declined parsing /home/myuser/gitrepos/ansibleplayground/ansibleplayground/hosts as it did not pass its verify_file() method script declined parsing /home/myuser/gitrepos/ansibleplayground/ansibleplayground/hosts as it did not pass its verify_file() method auto declined parsing /home/myuser/gitrepos/ansibleplayground/ansibleplayground/hosts as it did not pass its verify_file() method Parsed /home/myuser/gitrepos/ansibleplayground/ansibleplayground/hosts inventory source with ini plugin Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: idrac_osdeploy2.yml **** 1 plays in idrac_osdeploy2.yml

PLAY [Generate custom iso using a kickstart file and install vSphere] ****

TASK [Gathering Facts] *** task path: /home/myuser/gitrepos/ansibleplayground/ansibleplayground/idrac_osdeploy2.yml:1 <X.X.X.15> ESTABLISH LOCAL CONNECTION FOR USER: myuser <X.X.X.15> EXEC /bin/sh -c 'echo ~myuser && sleep 0' <X.X.X.15> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/myuser/.ansible/tmp"&& mkdir "echo /home/myuser/.ansible/tmp/ansible-tmp-1690456836.561672-2958023-252538896183174" && echo ansible-tmp-1690456836.561672-2958023-252538896183174="echo /home/myuser/.ansible/tmp/ansible-tmp-1690456836.561672-2958023-252538896183174" ) && sleep 0' <X.X.X.15> Attempting python interpreter discovery <X.X.X.15> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'python3.11'"'"'; command -v '"'"'python3.10'"'"'; command -v '"'"'python3.9'"'"'; command -v '"'"'python3.8'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0' <X.X.X.15> EXEC /bin/sh -c '/usr/bin/python3.11 && sleep 0' Using module file /home/myuser/.local/lib/python3.9/site-packages/ansible/modules/setup.py <X.X.X.15> PUT /home/myuser/.ansible/tmp/ansible-local-2957961imjg4gsc/tmpzfja51xu TO /home/myuser/.ansible/tmp/ansible-tmp-1690456836.561672-2958023-252538896183174/AnsiballZ_setup.py <X.X.X.15> EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456836.561672-2958023-252538896183174/ /home/myuser/.ansible/tmp/ansible-tmp-1690456836.561672-2958023-252538896183174/AnsiballZ_setup.py && sleep 0' <X.X.X.15> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-jyepycdhjipaotzhsvmbthqqzwuqikyl ; /usr/bin/python3 /home/myuser/.ansible/tmp/ansible-tmp-1690456836.561672-2958023-252538896183174/AnsiballZ_setup.py'"'"' && sleep 0' <X.X.X.15> EXEC /bin/sh -c 'rm -f -r /home/myuser/.ansible/tmp/ansible-tmp-1690456836.561672-2958023-252538896183174/ > /dev/null 2>&1 && sleep 0' ok: [X.X.X.15]

TASK [dellemc.openmanage.idrac_os_deployment : Validating arguments against arg spec 'main' - Role to deploy operating system on the iDRAC servers] ** task path: /home/myuser/gitrepos/ansibleplayground/ansibleplayground/idrac_osdeploy2.yml:1 ok: [X.X.X.15] => { "changed": false, "msg": "The arg spec validation passed", "validate_args_context": { "argument_spec_name": "main", "name": "idrac_os_deployment", "path": "/home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment", "type": "role" } }

TASK [dellemc.openmanage.idrac_os_deployment : Validate the Inputs] ** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/main.yml:5 included: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/validate_inputs.yml for X.X.X.15

TASK [dellemc.openmanage.idrac_os_deployment : Validate the OS Name and OS version is provided] ** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/validate_inputs.yml:5 skipping: [X.X.X.15] => { "changed": false, "false_condition": "os_name is undefined or os_version is undefined", "skip_reason": "Conditional result was False" }

TASK [dellemc.openmanage.idrac_os_deployment : Validate the OS Name and OS version] ** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/validate_inputs.yml:10 skipping: [X.X.X.15] => { "changed": false, "false_condition": "(os_name | upper not in idrac_os_deployment_supported_os.keys()) or ((os_version | string | split('.') | first) not in idrac_os_deployment_supported_os[os_name | upper])", "skip_reason": "Conditional result was False" }

TASK [dellemc.openmanage.idrac_os_deployment : Check if root password exists] **** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/validate_inputs.yml:16 skipping: [X.X.X.15] => { "changed": false, "false_condition": "((os_name | upper == 'RHEL') and (rhel_rootpw | length == 0)) or ((os_name | upper == 'ESXI') and (esxi_rootpw | length == 0))", "skip_reason": "Conditional result was False" }

TASK [dellemc.openmanage.idrac_os_deployment : Check if the template file exists] **** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/validate_inputs.yml:27

ESTABLISH LOCAL CONNECTION FOR USER: myuser EXEC /bin/sh -c 'echo ~myuser && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/myuser/.ansible/tmp `"&& mkdir "` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456847.1406925-2959011-111036358098010 `" && echo ansible-tmp-1690456847.1406925-2959011-111036358098010="` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456847.1406925-2959011-111036358098010 `" ) && sleep 0' Using module file /home/myuser/.local/lib/python3.9/site-packages/ansible/modules/stat.py PUT /home/myuser/.ansible/tmp/ansible-local-2957961imjg4gsc/tmp8a8pky39 TO /home/myuser/.ansible/tmp/ansible-tmp-1690456847.1406925-2959011-111036358098010/AnsiballZ_stat.py EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456847.1406925-2959011-111036358098010/ /home/myuser/.ansible/tmp/ansible-tmp-1690456847.1406925-2959011-111036358098010/AnsiballZ_stat.py && sleep 0' EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-zafwgisebrfgpbzkwibezgapoofzphlz ; /usr/bin/python3 /home/myuser/.ansible/tmp/ansible-tmp-1690456847.1406925-2959011-111036358098010/AnsiballZ_stat.py'"'"' && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/myuser/.ansible/tmp/ansible-tmp-1690456847.1406925-2959011-111036358098010/ > /dev/null 2>&1 && sleep 0' ok: [X.X.X.15 -> localhost] => { "changed": false, "invocation": { "module_args": { "checksum_algorithm": "sha1", "follow": false, "get_attributes": true, "get_checksum": true, "get_md5": false, "get_mime": true, "path": "/home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/templates/ESXI_8.j2" } }, "stat": { "atime": 1690441072.6101868, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "d4c15892afac8c961c60f7beb86cee9f0884b302", "ctime": 1690440574.0917747, "dev": 64770, "device_type": 0, "executable": false, "exists": true, "gid": 1000, "gr_name": "myuser", "inode": 77099322, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0644", "mtime": 1690440574.0917747, "nlink": 1, "path": "/home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/templates/ESXI_8.j2", "pw_name": "myuser", "readable": true, "rgrp": true, "roth": true, "rusr": true, "size": 1343, "uid": 1000, "version": "58187175", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [dellemc.openmanage.idrac_os_deployment : Fail if the Template file doesn't exists] ***************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/validate_inputs.yml:33 skipping: [X.X.X.15] => { "changed": false, "false_condition": "not idrac_os_deployment_template_file.stat.exists", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Validate destination required when custom iso is an input] ************************************************************************************************************************************ task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/validate_inputs.yml:38 skipping: [X.X.X.15] => { "changed": false, "false_condition": "destination is not defined", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Validate destination iso_name is not empty if provided] *************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/validate_inputs.yml:43 skipping: [X.X.X.15] => { "changed": false, "false_condition": "(destination is defined and destination.iso_name is defined and destination.iso_name == \"\")", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Validate destination mountpath] *************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/validate_inputs.yml:53 ESTABLISH LOCAL CONNECTION FOR USER: myuser EXEC /bin/sh -c 'echo ~myuser && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/myuser/.ansible/tmp `"&& mkdir "` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456848.1361814-2959106-48516596012720 `" && echo ansible-tmp-1690456848.1361814-2959106-48516596012720="` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456848.1361814-2959106-48516596012720 `" ) && sleep 0' Using module file /home/myuser/.local/lib/python3.9/site-packages/ansible/modules/stat.py PUT /home/myuser/.ansible/tmp/ansible-local-2957961imjg4gsc/tmpelaj413h TO /home/myuser/.ansible/tmp/ansible-tmp-1690456848.1361814-2959106-48516596012720/AnsiballZ_stat.py EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456848.1361814-2959106-48516596012720/ /home/myuser/.ansible/tmp/ansible-tmp-1690456848.1361814-2959106-48516596012720/AnsiballZ_stat.py && sleep 0' EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-rhjidqrpzdxmesjrpycqnlhbppibxqng ; /usr/bin/python3 /home/myuser/.ansible/tmp/ansible-tmp-1690456848.1361814-2959106-48516596012720/AnsiballZ_stat.py'"'"' && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/myuser/.ansible/tmp/ansible-tmp-1690456848.1361814-2959106-48516596012720/ > /dev/null 2>&1 && sleep 0' ok: [X.X.X.15 -> localhost] => { "changed": false, "invocation": { "module_args": { "checksum_algorithm": "sha1", "follow": false, "get_attributes": true, "get_checksum": true, "get_md5": false, "get_mime": true, "path": "/home/myuser/nfss" } }, "stat": { "atime": 1690441649.0669365, "attr_flags": "", "attributes": [], "block_size": 524288, "blocks": 0, "charset": "binary", "ctime": 1690441570.7714663, "dev": 91, "device_type": 0, "executable": true, "exists": true, "gid": 0, "gr_name": "root", "inode": 1391, "isblk": false, "ischr": false, "isdir": true, "isfifo": false, "isgid": false, "islnk": false, "isreg": false, "issock": false, "isuid": false, "mimetype": "inode/directory", "mode": "0777", "mtime": 1690441570.7714663, "nlink": 2, "path": "/home/myuser/nfss", "pw_name": "root", "readable": true, "rgrp": true, "roth": true, "rusr": true, "size": 6, "uid": 0, "version": null, "wgrp": true, "woth": true, "writeable": true, "wusr": true, "xgrp": true, "xoth": true, "xusr": true } } TASK [dellemc.openmanage.idrac_os_deployment : Fail if the mountpoint destination doesn't exists] ******************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/validate_inputs.yml:58 skipping: [X.X.X.15] => { "changed": false, "false_condition": "not idrac_os_deployment_mountpoint_folder.stat.exists", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Validate when source is local custom iso is not true] ***************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/validate_inputs.yml:63 skipping: [X.X.X.15] => { "changed": false, "false_condition": "(source.is_custom_iso is defined and source.is_custom_iso is true) and (source.protocol == \"local\")", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Validate hostname requirement for source] ***************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/validate_inputs.yml:69 skipping: [X.X.X.15] => { "changed": false, "false_condition": "(source.hostname is undefined or source.hostname == \"\")", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Create working directory] ********************************************************************************************************************************************************************* task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/main.yml:11 included: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/create_working_directory_path.yml for X.X.X.15 TASK [dellemc.openmanage.idrac_os_deployment : Create working directory] ********************************************************************************************************************************************************************* task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/create_working_directory_path.yml:2 ESTABLISH LOCAL CONNECTION FOR USER: myuser EXEC /bin/sh -c 'echo ~myuser && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/myuser/.ansible/tmp `"&& mkdir "` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456848.9814277-2959166-95881011532733 `" && echo ansible-tmp-1690456848.9814277-2959166-95881011532733="` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456848.9814277-2959166-95881011532733 `" ) && sleep 0' Using module file /home/myuser/.local/lib/python3.9/site-packages/ansible/modules/tempfile.py PUT /home/myuser/.ansible/tmp/ansible-local-2957961imjg4gsc/tmp1vg2ko3d TO /home/myuser/.ansible/tmp/ansible-tmp-1690456848.9814277-2959166-95881011532733/AnsiballZ_tempfile.py EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456848.9814277-2959166-95881011532733/ /home/myuser/.ansible/tmp/ansible-tmp-1690456848.9814277-2959166-95881011532733/AnsiballZ_tempfile.py && sleep 0' EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-xymmnhxhfjkalyoflfuhkmysadewtgqm ; /usr/bin/python3 /home/myuser/.ansible/tmp/ansible-tmp-1690456848.9814277-2959166-95881011532733/AnsiballZ_tempfile.py'"'"' && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/myuser/.ansible/tmp/ansible-tmp-1690456848.9814277-2959166-95881011532733/ > /dev/null 2>&1 && sleep 0' changed: [X.X.X.15 -> localhost] => { "changed": true, "gid": 0, "group": "root", "invocation": { "module_args": { "path": null, "prefix": "omam_osd", "state": "directory", "suffix": "" } }, "mode": "0700", "owner": "root", "path": "/tmp/omam_osdi6ed1f2q", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [dellemc.openmanage.idrac_os_deployment : Set custom iso filename] ********************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/create_working_directory_path.yml:9 skipping: [X.X.X.15] => { "changed": false, "false_condition": "destination is defined and destination.iso_name is defined", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Set custom iso path] ************************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/create_working_directory_path.yml:14 ok: [X.X.X.15] => { "ansible_facts": { "idrac_os_deployment_custom_iso_file": "/tmp/omam_osdi6ed1f2q/X.X.X.15_VMware-VMvisor-Installer-8.0U1a-21813344.x86_64.iso" }, "changed": false } TASK [dellemc.openmanage.idrac_os_deployment : Create a extract directory in the working directory] ****************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/create_working_directory_path.yml:18 ESTABLISH LOCAL CONNECTION FOR USER: myuser EXEC /bin/sh -c 'echo ~myuser && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/myuser/.ansible/tmp `"&& mkdir "` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456849.8231385-2959236-40789438584504 `" && echo ansible-tmp-1690456849.8231385-2959236-40789438584504="` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456849.8231385-2959236-40789438584504 `" ) && sleep 0' Using module file /home/myuser/.local/lib/python3.9/site-packages/ansible/modules/file.py PUT /home/myuser/.ansible/tmp/ansible-local-2957961imjg4gsc/tmp0sq468cz TO /home/myuser/.ansible/tmp/ansible-tmp-1690456849.8231385-2959236-40789438584504/AnsiballZ_file.py EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456849.8231385-2959236-40789438584504/ /home/myuser/.ansible/tmp/ansible-tmp-1690456849.8231385-2959236-40789438584504/AnsiballZ_file.py && sleep 0' EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-ivyrzlyvuqtoinrzbyhsjlwzwjrraktn ; /usr/bin/python3 /home/myuser/.ansible/tmp/ansible-tmp-1690456849.8231385-2959236-40789438584504/AnsiballZ_file.py'"'"' && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/myuser/.ansible/tmp/ansible-tmp-1690456849.8231385-2959236-40789438584504/ > /dev/null 2>&1 && sleep 0' changed: [X.X.X.15 -> localhost] => { "changed": true, "diff": { "after": { "path": "/tmp/omam_osdi6ed1f2q/extract", "state": "directory" }, "before": { "path": "/tmp/omam_osdi6ed1f2q/extract", "state": "absent" } }, "gid": 0, "group": "root", "invocation": { "module_args": { "_diff_peek": null, "_original_basename": null, "access_time": null, "access_time_format": "%Y%m%d%H%M.%S", "attributes": null, "follow": true, "force": false, "group": null, "mode": "0755", "modification_time": null, "modification_time_format": "%Y%m%d%H%M.%S", "owner": null, "path": "/tmp/omam_osdi6ed1f2q/extract", "recurse": false, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": null, "state": "directory", "unsafe_writes": false } }, "mode": "0755", "owner": "root", "path": "/tmp/omam_osdi6ed1f2q/extract", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [dellemc.openmanage.idrac_os_deployment : Set extracted directory path] ***************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/create_working_directory_path.yml:26 ok: [X.X.X.15] => { "ansible_facts": { "idrac_os_deployment_iso_extract_dir": "/tmp/omam_osdi6ed1f2q/extract" }, "changed": false } TASK [dellemc.openmanage.idrac_os_deployment : Download the Source iso] ********************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/main.yml:14 included: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml for X.X.X.15 TASK [dellemc.openmanage.idrac_os_deployment : Set the Download path for http https] ********************************************************************************************************************************************************* task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml:8 skipping: [X.X.X.15] => { "changed": false, "false_condition": "source.protocol in ['http', 'https']", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Download iso from source using wget for http and https] *************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml:13 skipping: [X.X.X.15] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } TASK [dellemc.openmanage.idrac_os_deployment : Set the iso file path] ************************************************************************************************************************************************************************ task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml:23 skipping: [X.X.X.15] => { "changed": false, "false_condition": "source.protocol in ['http', 'https']", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Set the Download path for local, cifs, nfs] *************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml:31 ok: [X.X.X.15 -> localhost] => { "ansible_facts": { "idrac_os_deployment_iso_path": "/home/myuser/Documents//VMware-VMvisor-Installer-8.0U1a-21813344.x86_64.iso" }, "changed": false } TASK [dellemc.openmanage.idrac_os_deployment : Copy the iso from the local source] *********************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml:36 ESTABLISH LOCAL CONNECTION FOR USER: myuser EXEC /bin/sh -c 'echo ~myuser && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/myuser/.ansible/tmp `"&& mkdir "` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385 `" && echo ansible-tmp-1690456851.033965-2959316-154753843185385="` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385 `" ) && sleep 0' Using module file /home/myuser/.local/lib/python3.9/site-packages/ansible/modules/stat.py PUT /home/myuser/.ansible/tmp/ansible-local-2957961imjg4gsc/tmpac_gd61a TO /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/AnsiballZ_stat.py EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/ /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/AnsiballZ_stat.py && sleep 0' EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-nnmjonpvboyknoopltbnbrrjkhyfduiz ; /usr/bin/python3 /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/AnsiballZ_stat.py'"'"' && sleep 0' Using module file /home/myuser/.local/lib/python3.9/site-packages/ansible/modules/stat.py PUT /home/myuser/.ansible/tmp/ansible-local-2957961imjg4gsc/tmpc2pvy3aj TO /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/AnsiballZ_stat.py EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/ /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/AnsiballZ_stat.py && sleep 0' EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-rvoydbralawkgwvkcsocogokqavynnai ; /usr/bin/python3 /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/AnsiballZ_stat.py'"'"' && sleep 0' PUT /home/myuser/Documents/VMware-VMvisor-Installer-8.0U1a-21813344.x86_64.iso TO /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/source EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/ /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/source && sleep 0' Using module file /home/myuser/.local/lib/python3.9/site-packages/ansible/modules/copy.py PUT /home/myuser/.ansible/tmp/ansible-local-2957961imjg4gsc/tmpmq_xovvv TO /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/AnsiballZ_copy.py EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/ /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/AnsiballZ_copy.py && sleep 0' EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-dxmljsqclyttjfhrehskwihvftkenilb ; /usr/bin/python3 /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/AnsiballZ_copy.py'"'"' && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/ > /dev/null 2>&1 && sleep 0' changed: [X.X.X.15 -> localhost] => { "changed": true, "checksum": "ce142434b34c994c9712651eac35099db973bd76", "dest": "/tmp/omam_osdi6ed1f2q/VMware-VMvisor-Installer-8.0U1a-21813344.x86_64.iso", "diff": [], "gid": 0, "group": "root", "invocation": { "module_args": { "_original_basename": "VMware-VMvisor-Installer-8.0U1a-21813344.x86_64.iso", "attributes": null, "backup": false, "checksum": "ce142434b34c994c9712651eac35099db973bd76", "content": null, "dest": "/tmp/omam_osdi6ed1f2q", "directory_mode": null, "follow": false, "force": true, "group": null, "local_follow": null, "mode": "0744", "owner": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/source", "unsafe_writes": false, "validate": null } }, "md5sum": "05768de15c1cf8790af9702c077493e5", "mode": "0744", "owner": "root", "secontext": "unconfined_u:object_r:user_home_t:s0", "size": 628588544, "src": "/home/myuser/.ansible/tmp/ansible-tmp-1690456851.033965-2959316-154753843185385/source", "state": "file", "uid": 0 } TASK [dellemc.openmanage.idrac_os_deployment : Set the iso file path] ************************************************************************************************************************************************************************ task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml:45 ok: [X.X.X.15 -> localhost] => { "ansible_facts": { "idrac_os_deployment_iso_file": "/tmp/omam_osdi6ed1f2q/VMware-VMvisor-Installer-8.0U1a-21813344.x86_64.iso", "success_message_os_deployment": "Successfully deployed the Operating System." }, "changed": false } TASK [dellemc.openmanage.idrac_os_deployment : Set the Download path for http, https] ******************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml:62 skipping: [X.X.X.15] => { "changed": false, "false_condition": "source.ks_path is defined and (source.is_custom_iso is undefined or source.is_custom_iso is false)", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Download ks from source using wget for http and https] **************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml:66 skipping: [X.X.X.15] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } TASK [dellemc.openmanage.idrac_os_deployment : Set the kickstart file path] ****************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml:76 skipping: [X.X.X.15] => { "changed": false, "false_condition": "source.ks_path is defined and (source.is_custom_iso is undefined or source.is_custom_iso is false)", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Set the Download path for local, cifs, nfs] *************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml:84 skipping: [X.X.X.15] => { "changed": false, "false_condition": "source.ks_path is defined and (source.is_custom_iso is undefined or source.is_custom_iso is false)", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Copy the kickstart from the local source] ***************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml:88 skipping: [X.X.X.15] => { "changed": false, "false_condition": "source.ks_path is defined and (source.is_custom_iso is undefined or source.is_custom_iso is false)", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Set the kickstart file path] ****************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml:96 skipping: [X.X.X.15] => { "changed": false, "false_condition": "source.ks_path is defined and (source.is_custom_iso is undefined or source.is_custom_iso is false)", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Validate kickstart file path extension] ******************************************************************************************************************************************************* task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/common/download_or_copy_source_files.yml:106 skipping: [X.X.X.15] => { "changed": false, "false_condition": "source.ks_path is defined and (source.is_custom_iso is undefined or source.is_custom_iso is false)", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Generate Kickstart file] ********************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/main.yml:17 included: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/iso/generate_kickstart_file.yml for X.X.X.15 TASK [dellemc.openmanage.idrac_os_deployment : Generate kickstart file] ********************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/iso/generate_kickstart_file.yml:6 ESTABLISH LOCAL CONNECTION FOR USER: myuser EXEC /bin/sh -c 'echo ~myuser && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/myuser/.ansible/tmp `"&& mkdir "` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219 `" && echo ansible-tmp-1690456863.356721-2960439-158743238427219="` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219 `" ) && sleep 0' Using module file /home/myuser/.local/lib/python3.9/site-packages/ansible/modules/stat.py PUT /home/myuser/.ansible/tmp/ansible-local-2957961imjg4gsc/tmpmzx8mf17 TO /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/AnsiballZ_stat.py EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/ /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/AnsiballZ_stat.py && sleep 0' EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-cisrbjiiuyrxsphrxwbdavvsegrpmjvy ; /usr/bin/python3 /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/AnsiballZ_stat.py'"'"' && sleep 0' PUT /home/myuser/.ansible/tmp/ansible-local-2957961imjg4gsc/tmp1cgtscyi/ESXI_8.j2 TO /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/source EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/ /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/source && sleep 0' Using module file /home/myuser/.local/lib/python3.9/site-packages/ansible/modules/copy.py PUT /home/myuser/.ansible/tmp/ansible-local-2957961imjg4gsc/tmpu9zd9qor TO /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/AnsiballZ_copy.py EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/ /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/AnsiballZ_copy.py && sleep 0' EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-hqbefagwxitqhnezanjqlvsvtzyqzepg ; /usr/bin/python3 /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/AnsiballZ_copy.py'"'"' && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/ > /dev/null 2>&1 && sleep 0' changed: [X.X.X.15 -> localhost] => { "changed": true, "checksum": "89d677d9ca22ea7fcc30a4d00588b9aa39429b20", "dest": "/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg", "diff": [], "gid": 0, "group": "root", "invocation": { "module_args": { "_original_basename": "ESXI_8.j2", "attributes": null, "backup": false, "checksum": "89d677d9ca22ea7fcc30a4d00588b9aa39429b20", "content": null, "dest": "/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg", "directory_mode": null, "follow": false, "force": true, "group": null, "local_follow": null, "mode": "0744", "owner": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/source", "unsafe_writes": false, "validate": null } }, "md5sum": "c7fdfb0b86f1ede76a67c83f1a5ab8e9", "mode": "0744", "owner": "root", "secontext": "unconfined_u:object_r:user_home_t:s0", "size": 330, "src": "/home/myuser/.ansible/tmp/ansible-tmp-1690456863.356721-2960439-158743238427219/source", "state": "file", "uid": 0 } TASK [dellemc.openmanage.idrac_os_deployment : Set ks file for specific idrac] *************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/iso/generate_kickstart_file.yml:13 ok: [X.X.X.15 -> localhost] => { "ansible_facts": { "idrac_os_deployment_kickstart_file": "/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg" }, "changed": false } TASK [dellemc.openmanage.idrac_os_deployment : Extract ISO] ********************************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/main.yml:21 included: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/iso/extract_iso.yml for X.X.X.15 TASK [dellemc.openmanage.idrac_os_deployment : Extract the iso on to extract folder] ********************************************************************************************************************************************************* task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/iso/extract_iso.yml:2 ESTABLISH LOCAL CONNECTION FOR USER: myuser EXEC /bin/sh -c 'echo ~myuser && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/myuser/.ansible/tmp `"&& mkdir "` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456864.5234718-2960542-34576468518994 `" && echo ansible-tmp-1690456864.5234718-2960542-34576468518994="` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456864.5234718-2960542-34576468518994 `" ) && sleep 0' Using module file /home/myuser/.local/lib/python3.9/site-packages/ansible/modules/command.py PUT /home/myuser/.ansible/tmp/ansible-local-2957961imjg4gsc/tmpk3w9mehl TO /home/myuser/.ansible/tmp/ansible-tmp-1690456864.5234718-2960542-34576468518994/AnsiballZ_command.py EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456864.5234718-2960542-34576468518994/ /home/myuser/.ansible/tmp/ansible-tmp-1690456864.5234718-2960542-34576468518994/AnsiballZ_command.py && sleep 0' EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-uzzviixrqhryzkvyqpcntjuplvznpzxp ; /usr/bin/python3 /home/myuser/.ansible/tmp/ansible-tmp-1690456864.5234718-2960542-34576468518994/AnsiballZ_command.py'"'"' && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/myuser/.ansible/tmp/ansible-tmp-1690456864.5234718-2960542-34576468518994/ > /dev/null 2>&1 && sleep 0' changed: [X.X.X.15 -> localhost] => { "changed": true, "cmd": [ "xorriso", "-osirrox", "on", "-indev", "/tmp/omam_osdi6ed1f2q/VMware-VMvisor-Installer-8.0U1a-21813344.x86_64.iso", "-extract", "/", "/tmp/omam_osdi6ed1f2q/extract" ], "delta": "0:00:00.940450", "end": "2023-07-27 13:21:06.008081", "failed_when_result": false, "invocation": { "module_args": { "_raw_params": "xorriso -osirrox on -indev /tmp/omam_osdi6ed1f2q/VMware-VMvisor-Installer-8.0U1a-21813344.x86_64.iso -extract / /tmp/omam_osdi6ed1f2q/extract", "_uses_shell": false, "argv": null, "chdir": null, "creates": null, "executable": null, "removes": null, "stdin": null, "stdin_add_newline": true, "strip_empty_ends": true } }, "msg": "", "rc": 0, "start": "2023-07-27 13:21:05.067631", "stderr": "xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.\n\nCopying of file objects from ISO image to disk filesystem is: Enabled\nxorriso : NOTE : Loading ISO image tree from LBA 0\nxorriso : UPDATE : 132 nodes read in 1 seconds\nxorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded\nDrive current: -indev '/tmp/omam_osdi6ed1f2q/VMware-VMvisor-Installer-8.0U1a-21813344.x86_64.iso'\nMedia current: stdio file, overwriteable\nMedia status : is written , is appendable\nBoot record : El Torito\nMedia summary: 1 session, 306928 data blocks, 599m data, 26.3g free\nVolume id : 'ESXI-8.0U1A-21813344-STANDARD'\nxorriso : UPDATE : 132 files restored ( 599.3m) in 1 seconds = 453.7xD\nExtracted from ISO image: file '/'='/tmp/omam_osdi6ed1f2q/extract'", "stderr_lines": [ "xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.", "", "Copying of file objects from ISO image to disk filesystem is: Enabled", "xorriso : NOTE : Loading ISO image tree from LBA 0", "xorriso : UPDATE : 132 nodes read in 1 seconds", "xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded", "Drive current: -indev '/tmp/omam_osdi6ed1f2q/VMware-VMvisor-Installer-8.0U1a-21813344.x86_64.iso'", "Media current: stdio file, overwriteable", "Media status : is written , is appendable", "Boot record : El Torito", "Media summary: 1 session, 306928 data blocks, 599m data, 26.3g free", "Volume id : 'ESXI-8.0U1A-21813344-STANDARD'", "xorriso : UPDATE : 132 files restored ( 599.3m) in 1 seconds = 453.7xD", "Extracted from ISO image: file '/'='/tmp/omam_osdi6ed1f2q/extract'" ], "stdout": "", "stdout_lines": [] } TASK [dellemc.openmanage.idrac_os_deployment : Compile iso for the OS] *********************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/main.yml:24 included: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/esxi/compile_iso.yml for X.X.X.15 TASK [dellemc.openmanage.idrac_os_deployment : Copy KS file to extracted directory] ********************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/esxi/compile_iso.yml:2 ESTABLISH LOCAL CONNECTION FOR USER: myuser EXEC /bin/sh -c 'echo ~myuser && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/myuser/.ansible/tmp `"&& mkdir "` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456866.3093581-2960696-158267045759291 `" && echo ansible-tmp-1690456866.3093581-2960696-158267045759291="` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456866.3093581-2960696-158267045759291 `" ) && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/myuser/.ansible/tmp/ansible-tmp-1690456866.3093581-2960696-158267045759291/ > /dev/null 2>&1 && sleep 0' The full traceback is: Traceback (most recent call last): File "/home/myuser/.local/lib/python3.9/site-packages/ansible/plugins/action/copy.py", line 466, in run source = self._find_needle('files', source) File "/home/myuser/.local/lib/python3.9/site-packages/ansible/plugins/action/__init__.py", line 1455, in _find_needle return self._loader.path_dwim_relative_stack(path_stack, dirname, needle) File "/home/myuser/.local/lib/python3.9/site-packages/ansible/parsing/dataloader.py", line 341, in path_dwim_relative_stack raise AnsibleFileNotFound(file_name=source, paths=[to_native(p) for p in search]) ansible.errors.AnsibleFileNotFound: Could not find or access '/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg' on the Ansible Controller. If you are using a module and expect the file to exist on the remote, see the remote_src option fatal: [X.X.X.15 -> localhost]: FAILED! => { "changed": false, "invocation": { "dest": "/tmp/omam_osdi6ed1f2q/extract/KS.CFG", "mode": "0744", "module_args": { "dest": "/tmp/omam_osdi6ed1f2q/extract/KS.CFG", "mode": "0744", "src": "/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg" }, "src": "/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg" }, "msg": "Could not find or access '/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option" } TASK [dellemc.openmanage.idrac_os_deployment : Set the failure messages] ********************************************************************************************************************************************************************* task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/main.yml:41 ok: [X.X.X.15] => { "ansible_facts": { "idrac_os_deployment_failure": { "changed": false, "exception": "Traceback (most recent call last):\n File \"/home/myuser/.local/lib/python3.9/site-packages/ansible/plugins/action/copy.py\", line 466, in run\n source = self._find_needle('files', source)\n File \"/home/myuser/.local/lib/python3.9/site-packages/ansible/plugins/action/__init__.py\", line 1455, in _find_needle\n return self._loader.path_dwim_relative_stack(path_stack, dirname, needle)\n File \"/home/myuser/.local/lib/python3.9/site-packages/ansible/parsing/dataloader.py\", line 341, in path_dwim_relative_stack\n raise AnsibleFileNotFound(file_name=source, paths=[to_native(p) for p in search])\nansible.errors.AnsibleFileNotFound: Could not find or access '/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option\n", "failed": true, "failed_task_name": "Copy KS file to extracted directory", "invocation": { "dest": "/tmp/omam_osdi6ed1f2q/extract/KS.CFG", "mode": "0744", "module_args": { "dest": "/tmp/omam_osdi6ed1f2q/extract/KS.CFG", "mode": "0744", "src": "/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg" }, "src": "/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg" }, "msg": "Could not find or access '/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option" } }, "changed": false } TASK [dellemc.openmanage.idrac_os_deployment : Clean up the local directories] *************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/main.yml:50 included: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/clean_up/clean_up_working_directory.yml for X.X.X.15 TASK [dellemc.openmanage.idrac_os_deployment : Clean up the working directory] *************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/clean_up/clean_up_working_directory.yml:1 ESTABLISH LOCAL CONNECTION FOR USER: myuser EXEC /bin/sh -c 'echo ~myuser && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/myuser/.ansible/tmp `"&& mkdir "` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456866.6803253-2960715-3956430418477 `" && echo ansible-tmp-1690456866.6803253-2960715-3956430418477="` echo /home/myuser/.ansible/tmp/ansible-tmp-1690456866.6803253-2960715-3956430418477 `" ) && sleep 0' Using module file /home/myuser/.local/lib/python3.9/site-packages/ansible/modules/file.py PUT /home/myuser/.ansible/tmp/ansible-local-2957961imjg4gsc/tmp9ss2xiyi TO /home/myuser/.ansible/tmp/ansible-tmp-1690456866.6803253-2960715-3956430418477/AnsiballZ_file.py EXEC /bin/sh -c 'chmod u+x /home/myuser/.ansible/tmp/ansible-tmp-1690456866.6803253-2960715-3956430418477/ /home/myuser/.ansible/tmp/ansible-tmp-1690456866.6803253-2960715-3956430418477/AnsiballZ_file.py && sleep 0' EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-tdqbictezzlpjcezmjwrfnzgrxrqzgck ; /usr/bin/python3 /home/myuser/.ansible/tmp/ansible-tmp-1690456866.6803253-2960715-3956430418477/AnsiballZ_file.py'"'"' && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/myuser/.ansible/tmp/ansible-tmp-1690456866.6803253-2960715-3956430418477/ > /dev/null 2>&1 && sleep 0' changed: [X.X.X.15 -> localhost] => { "changed": true, "diff": { "after": { "path": "/tmp/omam_osdi6ed1f2q", "state": "absent" }, "before": { "path": "/tmp/omam_osdi6ed1f2q", "path_content": { "directories": [ "/tmp/omam_osdi6ed1f2q/extract", "/tmp/omam_osdi6ed1f2q/extract/EFI", "/tmp/omam_osdi6ed1f2q/extract/UPGRADE", "/tmp/omam_osdi6ed1f2q/extract/EFI/BOOT" ], "files": [ "/tmp/omam_osdi6ed1f2q/VMware-VMvisor-Installer-8.0U1a-21813344.x86_64.iso", "/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg", "/tmp/omam_osdi6ed1f2q/extract/BOOT.CAT", "/tmp/omam_osdi6ed1f2q/extract/.DISCINFO", "/tmp/omam_osdi6ed1f2q/extract/ATLANTIC.V00", "/tmp/omam_osdi6ed1f2q/extract/B.B00", "/tmp/omam_osdi6ed1f2q/extract/BASEMISC.TGZ", "/tmp/omam_osdi6ed1f2q/extract/BCM_MPI3.V00", "/tmp/omam_osdi6ed1f2q/extract/BMCAL.V00", "/tmp/omam_osdi6ed1f2q/extract/BNXTNET.V00", "/tmp/omam_osdi6ed1f2q/extract/BNXTROCE.V00", "/tmp/omam_osdi6ed1f2q/extract/BOOT.CFG", "/tmp/omam_osdi6ed1f2q/extract/BRCMFCOE.V00", "/tmp/omam_osdi6ed1f2q/extract/BTLDR.V00", "/tmp/omam_osdi6ed1f2q/extract/CLUSTERS.V00", "/tmp/omam_osdi6ed1f2q/extract/CNDI_IGC.V00", "/tmp/omam_osdi6ed1f2q/extract/CRX.V00", "/tmp/omam_osdi6ed1f2q/extract/DWI2C.V00", "/tmp/omam_osdi6ed1f2q/extract/EFIBOOT.IMG", "/tmp/omam_osdi6ed1f2q/extract/ELXISCSI.V00", "/tmp/omam_osdi6ed1f2q/extract/ELXNET.V00", "/tmp/omam_osdi6ed1f2q/extract/ELX_ESX_.V00", "/tmp/omam_osdi6ed1f2q/extract/ESXIODPT.TGZ", "/tmp/omam_osdi6ed1f2q/extract/ESXIO_CO.V00", "/tmp/omam_osdi6ed1f2q/extract/ESXUPDT.V00", "/tmp/omam_osdi6ed1f2q/extract/ESX_DVFI.V00", "/tmp/omam_osdi6ed1f2q/extract/ESX_UI.V00", "/tmp/omam_osdi6ed1f2q/extract/FATBOOTSECTOR", "/tmp/omam_osdi6ed1f2q/extract/FEATURES.GZ", "/tmp/omam_osdi6ed1f2q/extract/GC.V00", "/tmp/omam_osdi6ed1f2q/extract/I40EN.V00", "/tmp/omam_osdi6ed1f2q/extract/IAVMD.V00", "/tmp/omam_osdi6ed1f2q/extract/ICEN.V00", "/tmp/omam_osdi6ed1f2q/extract/IGBN.V00", "/tmp/omam_osdi6ed1f2q/extract/IMGDB.TGZ", "/tmp/omam_osdi6ed1f2q/extract/IMGPAYLD.TGZ", "/tmp/omam_osdi6ed1f2q/extract/INTELGPI.V00", "/tmp/omam_osdi6ed1f2q/extract/IONIC_EN.V00", "/tmp/omam_osdi6ed1f2q/extract/IRDMAN.V00", "/tmp/omam_osdi6ed1f2q/extract/ISER.V00", "/tmp/omam_osdi6ed1f2q/extract/ISOLINUX.BIN", "/tmp/omam_osdi6ed1f2q/extract/ISOLINUX.CFG", "/tmp/omam_osdi6ed1f2q/extract/IXGBEN.V00", "/tmp/omam_osdi6ed1f2q/extract/JUMPSTRT.GZ", "/tmp/omam_osdi6ed1f2q/extract/K.B00", "/tmp/omam_osdi6ed1f2q/extract/LDLINUX.SYS", "/tmp/omam_osdi6ed1f2q/extract/LOADESX.V00", "/tmp/omam_osdi6ed1f2q/extract/LPFC.V00", "/tmp/omam_osdi6ed1f2q/extract/LPNIC.V00", "/tmp/omam_osdi6ed1f2q/extract/LSI_MR3.V00", "/tmp/omam_osdi6ed1f2q/extract/LSI_MSGP.V00", "/tmp/omam_osdi6ed1f2q/extract/LSI_MSGP.V01", "/tmp/omam_osdi6ed1f2q/extract/LSI_MSGP.V02", "/tmp/omam_osdi6ed1f2q/extract/LSUV2_HP.V00", "/tmp/omam_osdi6ed1f2q/extract/LSUV2_IN.V00", "/tmp/omam_osdi6ed1f2q/extract/LSUV2_LS.V00", "/tmp/omam_osdi6ed1f2q/extract/LSUV2_NV.V00", "/tmp/omam_osdi6ed1f2q/extract/LSUV2_OE.V00", "/tmp/omam_osdi6ed1f2q/extract/LSUV2_OE.V01", "/tmp/omam_osdi6ed1f2q/extract/LSUV2_SM.V00", "/tmp/omam_osdi6ed1f2q/extract/MBOOT.C32", "/tmp/omam_osdi6ed1f2q/extract/MENU.C32", "/tmp/omam_osdi6ed1f2q/extract/MTIP32XX.V00", "/tmp/omam_osdi6ed1f2q/extract/NATIVE_M.V00", "/tmp/omam_osdi6ed1f2q/extract/NE1000.V00", "/tmp/omam_osdi6ed1f2q/extract/NENIC.V00", "/tmp/omam_osdi6ed1f2q/extract/NFNIC.V00", "/tmp/omam_osdi6ed1f2q/extract/NHPSA.V00", "/tmp/omam_osdi6ed1f2q/extract/NMLX5_CO.V00", "/tmp/omam_osdi6ed1f2q/extract/NMLX5_RD.V00", "/tmp/omam_osdi6ed1f2q/extract/NTG3.V00", "/tmp/omam_osdi6ed1f2q/extract/NVMERDMA.V00", "/tmp/omam_osdi6ed1f2q/extract/NVMETCP.V00", "/tmp/omam_osdi6ed1f2q/extract/NVME_PCI.V00", "/tmp/omam_osdi6ed1f2q/extract/NVMXNET3.V00", "/tmp/omam_osdi6ed1f2q/extract/NVMXNET3.V01", "/tmp/omam_osdi6ed1f2q/extract/PROCFS.B00", "/tmp/omam_osdi6ed1f2q/extract/PVSCSI.V00", "/tmp/omam_osdi6ed1f2q/extract/QCNIC.V00", "/tmp/omam_osdi6ed1f2q/extract/QEDENTV.V00", "/tmp/omam_osdi6ed1f2q/extract/QEDRNTV.V00", "/tmp/omam_osdi6ed1f2q/extract/QFLE3.V00", "/tmp/omam_osdi6ed1f2q/extract/QFLE3F.V00", "/tmp/omam_osdi6ed1f2q/extract/QFLE3I.V00", "/tmp/omam_osdi6ed1f2q/extract/QFLGE.V00", "/tmp/omam_osdi6ed1f2q/extract/QLNATIVE.V00", "/tmp/omam_osdi6ed1f2q/extract/RDMAHL.V00", "/tmp/omam_osdi6ed1f2q/extract/RESVIBS.TGZ", "/tmp/omam_osdi6ed1f2q/extract/RSTE.V00", "/tmp/omam_osdi6ed1f2q/extract/S.V00", "/tmp/omam_osdi6ed1f2q/extract/SAFEBOOT.C32", "/tmp/omam_osdi6ed1f2q/extract/SB.V00", "/tmp/omam_osdi6ed1f2q/extract/SFVMK.V00", "/tmp/omam_osdi6ed1f2q/extract/SMARTPQI.V00", "/tmp/omam_osdi6ed1f2q/extract/TOOLS.T00", "/tmp/omam_osdi6ed1f2q/extract/TPM.V00", "/tmp/omam_osdi6ed1f2q/extract/TPMESXUP.V00", "/tmp/omam_osdi6ed1f2q/extract/TRX.V00", "/tmp/omam_osdi6ed1f2q/extract/UC_AMD.B00", "/tmp/omam_osdi6ed1f2q/extract/UC_HYGON.B00", "/tmp/omam_osdi6ed1f2q/extract/UC_INTEL.B00", "/tmp/omam_osdi6ed1f2q/extract/USEROPTS.GZ", "/tmp/omam_osdi6ed1f2q/extract/VDFS.V00", "/tmp/omam_osdi6ed1f2q/extract/VDS_VSIP.V00", "/tmp/omam_osdi6ed1f2q/extract/VIM.V00", "/tmp/omam_osdi6ed1f2q/extract/VMKATA.V00", "/tmp/omam_osdi6ed1f2q/extract/VMKSDHCI.V00", "/tmp/omam_osdi6ed1f2q/extract/VMKUSB.V00", "/tmp/omam_osdi6ed1f2q/extract/VMWARE-ESX-BASE-OSL.TXT", "/tmp/omam_osdi6ed1f2q/extract/VMWARE-ESX-BASE-README", "/tmp/omam_osdi6ed1f2q/extract/VMWARE_E.V00", "/tmp/omam_osdi6ed1f2q/extract/VMW_AHCI.V00", "/tmp/omam_osdi6ed1f2q/extract/VMX.V00", "/tmp/omam_osdi6ed1f2q/extract/VSAN.V00", "/tmp/omam_osdi6ed1f2q/extract/VSANHEAL.V00", "/tmp/omam_osdi6ed1f2q/extract/VSANMGMT.V00", "/tmp/omam_osdi6ed1f2q/extract/WEASELIN.V00", "/tmp/omam_osdi6ed1f2q/extract/XORG.V00", "/tmp/omam_osdi6ed1f2q/extract/EFI/BOOT/BOOT.CFG", "/tmp/omam_osdi6ed1f2q/extract/EFI/BOOT/BOOTX64.EFI", "/tmp/omam_osdi6ed1f2q/extract/EFI/BOOT/CRYPTO64.EFI", "/tmp/omam_osdi6ed1f2q/extract/EFI/BOOT/SAFEBOOT.EFI", "/tmp/omam_osdi6ed1f2q/extract/UPGRADE/ESXIMAGE.ZIP", "/tmp/omam_osdi6ed1f2q/extract/UPGRADE/EXTLINUX", "/tmp/omam_osdi6ed1f2q/extract/UPGRADE/GPTMBR.BIN", "/tmp/omam_osdi6ed1f2q/extract/UPGRADE/MBR.BIN", "/tmp/omam_osdi6ed1f2q/extract/UPGRADE/METADATA.XML", "/tmp/omam_osdi6ed1f2q/extract/UPGRADE/METADATA.ZIP", "/tmp/omam_osdi6ed1f2q/extract/UPGRADE/PRECHECK.PY", "/tmp/omam_osdi6ed1f2q/extract/UPGRADE/PREP.PY", "/tmp/omam_osdi6ed1f2q/extract/UPGRADE/PROFILE.XML" ] }, "state": "directory" } }, "failed_when_result": false, "invocation": { "module_args": { "_diff_peek": null, "_original_basename": null, "access_time": null, "access_time_format": "%Y%m%d%H%M.%S", "attributes": null, "follow": true, "force": false, "group": null, "mode": null, "modification_time": null, "modification_time_format": "%Y%m%d%H%M.%S", "owner": null, "path": "/tmp/omam_osdi6ed1f2q", "recurse": false, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": null, "state": "absent", "unsafe_writes": false } }, "path": "/tmp/omam_osdi6ed1f2q", "state": "absent" } TASK [dellemc.openmanage.idrac_os_deployment : Clean up the destination] ********************************************************************************************************************************************************************* task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/main.yml:53 skipping: [X.X.X.15] => { "changed": false, "false_condition": "idrac_os_deployment_copied_to_destination is true", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Clean up the virtual Media] ******************************************************************************************************************************************************************* task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/main.yml:59 skipping: [X.X.X.15] => { "changed": false, "false_condition": "idrac_os_deployment_virtual_media_attached is true", "skip_reason": "Conditional result was False" } TASK [dellemc.openmanage.idrac_os_deployment : Report task failure] ************************************************************************************************************************************************************************** task path: /home/myuser/.ansible/collections/ansible_collections/dellemc/openmanage/roles/idrac_os_deployment/tasks/main.yml:65 fatal: [X.X.X.15]: FAILED! => { "failed_when_result": true, "idrac_os_deployment_failure": { "changed": false, "exception": "Traceback (most recent call last):\n File \"/home/myuser/.local/lib/python3.9/site-packages/ansible/plugins/action/copy.py\", line 466, in run\n source = self._find_needle('files', source)\n File \"/home/myuser/.local/lib/python3.9/site-packages/ansible/plugins/action/__init__.py\", line 1455, in _find_needle\n return self._loader.path_dwim_relative_stack(path_stack, dirname, needle)\n File \"/home/myuser/.local/lib/python3.9/site-packages/ansible/parsing/dataloader.py\", line 341, in path_dwim_relative_stack\n raise AnsibleFileNotFound(file_name=source, paths=[to_native(p) for p in search])\nansible.errors.AnsibleFileNotFound: Could not find or access '/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option\n", "failed": true, "failed_task_name": "Copy KS file to extracted directory", "invocation": { "dest": "/tmp/omam_osdi6ed1f2q/extract/KS.CFG", "mode": "0744", "module_args": { "dest": "/tmp/omam_osdi6ed1f2q/extract/KS.CFG", "mode": "0744", "src": "/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg" }, "src": "/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg" }, "msg": "Could not find or access '/tmp/omam_osdi6ed1f2q/kickstart_ESXI_X.X.X.15.cfg' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option" } } PLAY RECAP *********************************************************************************************************************************************************************************************************************************** X.X.X.15 : ok=23 changed=6 unreachable=0 failed=1 skipped=22 rescued=1 ignored=0 [myuser@myuserdev ansibleplayground]$ `
sachin-apa commented 1 year ago

@es1lentr Thank You for the logs, You are right xorriso command is extracting a files with no write permission and hence the file cannot be updated. I don't see become: true affecting this.

Can you try the below. From your collection installation directory please update the below file and line number with a command to update the permissions of export folder.

https://github.com/dell/dellemc-openmanage-ansible-modules/blob/01db808b25d3b18624934e3be953a9198928d782/roles/idrac_os_deployment/tasks/iso/extract_iso.yml#L7

Updated Code: ansible.builtin.command: "{{ idrac_os_deployment_xorriso_cmd | format(idrac_os_deployment_iso_file, idrac_os_deployment_iso_extract_dir) }} | chmod -R 0744 {{ idrac_os_deployment_iso_extract_dir }}"

Please give this a try and let me know the results.

es1lenter commented 1 year ago

Hi @sachin-apa,

I have now modified that file in my local collection and the extract_iso.yml file looks like this:

`---

I am now getting a different error when running the playbook via the ansible-playbook -i myinventory playbook.yml -vvv command, attached as a txt file. Looks like just a syntax error?

[TASK dellemc.openmanage.idrac_os_d.txt

sachin-apa commented 1 year ago

@es1lentr Alright then lets do it in an ansible way then please add the below task to the file extract_iso.yml and retry.

- name: Update file permissions
  delegate_to: "{{ idrac_os_deployment_delegate }}"
  ansible.builtin.file:
    path: "{{ idrac_os_deployment_iso_extract_dir }}"
    state: directory
    recurse: true
    mode: "0744"
es1lenter commented 1 year ago

Hello @sachin-apa and thank you for your swift help so far! This indeed has solved this particular issue - i tried it with and without the added code multiple times and it indeed made a difference, making the file errors gone.

I have to also add that i have now removed "become: true" from my playbook as this seemed to cause more issues than good and it is also not present in the example playbooks which could indicate it should not be used in the first place.

I have ended up with a different error this time, i am adding it here as an attachment, but if i'm not able to figure it out, i'll probably have to open another issue as this could be unrelated? I'll also try another ISO. / update - tried with the first vsphere 8.0.0 ISO, same issue.

TASKdellemc.openmanage.idrac_os_d.txt

es1lenter commented 1 year ago

Currently it seems to be an issue with mkisofs/genisoimage itself and i'm trying to run the command manually.

I see the command used in the collection is the same as on https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.esxi.install.doc/GUID-C03EADEA-A192-4AB4-9B71-9256A9CB1F9C.html

Will continue testing. At the moment i removed -eltorito-platform efi from the command line and the ISO generated successfully, but i'm not so sure about it booting. I'll modify it in the local collection tomorrow and test.

I removed the mentioned line from the idrac_os_deployment_esxi_mkiso_cmd variable and then i got another error. This time with isohybrid and i can safely assume it's because i tried removing the efi part. Just in case the log is below. withoutefidellemc.openmanage.idrac_os_d.txt

es1lenter commented 1 year ago

I have changed the mkisofs to xorrisofs in line 66 in the idrac_os_deployment/vars/main.yml and it seems to run great now. I tried also with genisoimage, but it only seemed to work with xorrisofs.

https://github.com/dell/dellemc-openmanage-ansible-modules/blob/01db808b25d3b18624934e3be953a9198928d782/roles/idrac_os_deployment/vars/main.yml#L66C2-L66C2

Long story short - the file access change and the mkisofs command to xorrisofs (same syntax) change seemed to do the trick for me.