LINUX.ORG.RU
решено ФорумAdmin

Ansible и Routeros

 ,


0

1

Добрый день.

Хочу добавить в ansible mikrotik.

В /etc/ansible/host

[Mikrotiks]
Test1 ansible_host=xx.xx.xx.xx ansible_user=mlns-net-kvs ansible_ssh_private_key_file=/root/.ssh/id_rsa

Если выполняю комманду ansible all -m raw -a «/system routerboard print», то ничего не происходит.

В подробном выводе:

ansible 2.7.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
Parsed /etc/ansible/hosts inventory source with ini plugin
Loading callback plugin minimal of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/minimal.pyc
META: ran handlers
<xx.xx.xx.xx> ESTABLISH SSH CONNECTION FOR USER: mlns-net-kvs
<xx.xx.xx.x> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)

<xx.xx.xx.xx> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="/root/.ssh/id_rsa")
<xx.xx.xx.x> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<xx.xx.xx.x> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=mlns-net-kvs)
<xx.xx.xx.xx> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<xx.xx.xx.31> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/root/.ansible/cp/64fcf1120a)
<xx.xx.xx.xx> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/root/.ssh/id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=mlns-net-kvs -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/64fcf1120a -tt xx.xx.xx.xx '/system routerboard print'

По ssh подключаюсь mikrotik.

В чём может быть проблема


Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.