Когда я запускаю ansible-playbook -k configure-clish.yml, я получаю следующие ошибки:
Я не думаю, что это проблема с синтаксисом, поскольку в коде Visual Studio нет проблем с синтаксисом.
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
ERROR! the role 'ashwin_sid.gaia_fw1' was not found in /app/sandbox/playbooks/roles:/home/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/app/sandbox/playbooks
The error appears to be in '/app/sandbox/playbooks/configure-clish.yml': line 25, column 16, but may
be elsewhere in the file depending on the exact syntax problem.
Вызывающая строка выглядит следующим образом:
'import_role:
name: ashwin_sid.gaia_fw1
^ here'
Это книга воспроизведения:
- hosts: localhost
tasks:
- command: /bin/echo "{{ lookup('pipe','date +%Y-%m-%d_%H-%M') }}"
register: foo
- file:
path: ../SHOW
state: directory
- hosts: ckp
serial: 1
gather_facts: no
tasks:
- name: SHOW COMMAND
import_role:
name: ashwin_sid.gaia_fw1
tasks_from: setclish
vars:
cmdfile: configure-clish.cmd
logdir: ../SHOW
Это файл hosts:
[ckp]
lab ansible_host=192.168.2.1
Это файл ansible.cfg:
[defaults]
roles_path = /app/sandbox/roles/ashwin_sid.gaia_fw1
inventory = /app/sandbox/hosts
host_key_checking = False
retry_files_enabled = False