I am new to ansible and am adapting some EOL software to work on a non-target platform. This is a very old application, but I have a business requirement to get it working on a newer OS. At this point, it requires Python 2.7, which is likely the source of my headaches, but I'm not sure if there's a way to work through it. I have been on an ansible learning journey for some time, and even if I can't solve this specific issue, I'm interested in trying to understand why it doesn't work because from what I see/understand, it should. The specific ansible playbook I'm looking at is here:
https://github.com/PaloAltoNetworks/minemeld-ansible/blob/master/roles/minemeld/tasks/main.yml Specifically, the following is giving me errors: # set permissions after install - name: minemeld directory permissions file: path="{{main_directory}}" state=directory recurse=yes owner=minemeld group=minemeld mode="{{file_permissions}}" I am getting the following error output on that step: An exception occurred during task execution. To see the full traceback, use -vvv. The error was: OSError: [Errno 95] Operation not supported: '/opt/minemeld/www/webui/node_modules/gulp-useref/node_modules/.bin/strip-bom' fatal: [127.0.0.1]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last): File \"/root/.ansible/tmp/ansible-tmp-1655840506.6-201342-88045696314185/AnsiballZ_file.py\", line 100, in <module> _ansiballz_main() File \"/root/.ansible/tmp/ansible-tmp-1655840506.6-201342-88045696314185/AnsiballZ_file.py\", line 92, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File \"/root/.ansible/tmp/ansible-tmp-1655840506.6-201342-88045696314185/AnsiballZ_file.py\", line 41, in invoke_module run_name='__main__', alter_sys=True) File \"/usr/lib/python2.7/runpy.py\", line 188, in run_module fname, loader, pkg_name) File \"/usr/lib/python2.7/runpy.py\", line 82, in _run_module_code mod_name, mod_fname, mod_loader, pkg_name) File \"/usr/lib/python2.7/runpy.py\", line 72, in _run_code exec code in run_globals File \"/tmp/ansible_file_payload_QSceSb/ansible_file_payload.zip/ansible/modules/file.py\", line 966, in <module> File \"/tmp/ansible_file_payload_QSceSb/ansible_file_payload.zip/ansible/modules/file.py\", line 952, in main File \"/tmp/ansible_file_payload_QSceSb/ansible_file_payload.zip/ansible/modules/file.py\", line 672, in ensure_directory File \"/tmp/ansible_file_payload_QSceSb/ansible_file_payload.zip/ansible/modules/file.py\", line 354, in recursive_set_attributes File \"/tmp/ansible_file_payload_QSceSb/ansible_file_payload.zip/ansible/module_utils/basic.py\", line 1170, in set_fs_attributes_if_different File \"/tmp/ansible_file_payload_QSceSb/ansible_file_payload.zip/ansible/module_utils/basic.py\", line 926, in set_mode_if_different OSError: [Errno 95] Operation not supported: '/opt/minemeld/www/webui/node_modules/gulp-useref/node_modules/.bin/strip-bom' ", "module_stdout": "", "msg": "MODULE FAILURE See stdout/stderr for the exact error", "rc": 1} This is the error I am getting when ansible tries to do anything to a symlink. That directory is the following: # ls -as1l /opt/minemeld/www/webui/node_modules/gulp-useref/node_modules/.bin/ total 8 4 drwxrwxr-x 2 minemeld minemeld 4096 Jun 21 20:13 . 4 drwxrwxr-x 19 minemeld minemeld 4096 Jun 21 20:13 .. 0 lrwxrwxrwx 1 root root 20 Jun 21 20:13 mkdirp -> ../mkdirp/bin/cmd.js 0 lrwxrwxrwx 1 minemeld minemeld 19 Jun 21 20:13 strip-bom -> ../strip-bom/cli.js I have modified the playbook to change follow=no, to no improvement. I am running the playbook as root for testing, and there are no strange mounts like NFS or CIFS, it's just the native filesystem. This is an ubuntu 22.04 server, and the python/ansible environment looks like this: # ansible-playbook --version [DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12. Current version: 2.7.18 (default, Mar 12 2022, 06:24:29) [GCC 11.2.0]. This feature will be removed from ansible-core in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. /usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release. from cryptography.exceptions import InvalidSignature ansible-playbook [core 2.11.12] config file = None configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible-playbook python version = 2.7.18 (default, Mar 12 2022, 06:24:29) [GCC 11.2.0] jinja version = 2.11.3 libyaml = True Any help or information is appreciated; I think there is a solution to getting the app running using docker, but I'm still curious as to why this step in ansible (or any step around copying/modifying symlinks) is failing. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/82ea29ee-7c7c-4fea-a31e-e0e695b63fd0n%40googlegroups.com.
