Ошибка была: re.error: глобальные флаги не в начале выражения в позиции 1 при запуске ansible playbook.Python

Программы на Python
Гость
Ошибка была: re.error: глобальные флаги не в начале выражения в позиции 1 при запуске ansible playbook.

Сообщение Гость »


Can someone please assist how to fix this issue, why i am getting this error while running the Ansible playbook

2023-03-31 11:47:39,902 p=57332 u=NI40153964 n=ansible | An exception occurred during task execution. To see the full traceback, use -vvv. The error was: re.error: global flags not at the start of the expression at position 1 2023-03-31 11:47:39,903 p=57332

Python & Ansible versions:
  • Python 3.11.2
  • Ansible [core 2.14.3]

The YML file which I am using as

Код: Выделить всё

    - name: rename log file to user specific       delegate_to: localhost       command: mv ~/.ansible/wmDeployment.log ~/.ansible/wmDeployment_{{_user}}.log       register: logfile_rename_output       run_once: true       ignore_errors: yes     - name: set the fact for email       set_fact:         package_list: "{{hostvars['localhost']['package_list']}}"         log_output: "{{log_data| regex_search('((?s)(?

Источник: [url]https://stackoverflow.com/questions/75895460/the-error-was-re-error-global-flags-not-at-the-start-of-the-expression-at-posi[/url]

Вернуться в «Python»