Pull to refresh

Comments 3

local_action уже давно deprecated. Надо использовать конструкцию с delegate_to: 127.0.0.1
откуда информация про «deprecated»?

There is also a shorthand syntax that you can use on a per-task basis: ‘local_action’.


http://docs.ansible.com/ansible/playbooks_delegation.html

Подскажите, пожалуйста. Есть код здесь https://github.com/opensearch-project/ansible-playbook/blob/main/roles/linux/opensearch/tasks/security.yml#L5-L11:

- name: Security Plugin configuration | Create local temporary directory for certificates generation
  local_action:
    module: file
    path: /tmp/opensearch-nodecerts
    state: directory
  run_once: true
  register: configuration

У меня он падает с ошибкой

TASK [linux/opensearch : Security Plugin configuration | Create local temporary directory for certificates generation] *******************************************************************
Friday 01 April 2022  11:54:03 +0600 (0:00:01.821)       0:00:15.542 **********
fatal: [master0 -> localhost]: FAILED! => changed=false
  module_stderr: |-
    sudo: a password is required
  module_stdout: ''
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 1

Хотя я в обычной ubuntu могу создать директорию /tmp/opensearch-nodecerts от юзера

Sign up to leave a comment.