Hi,
---
- hosts: all
gather_facts: no
tasks:
- name: check for server ssh
wait_for:
port: 22
host: "{{ item }}"
state: started
search_regex: SSH
delay: 5
timeout: 300
register: ssh_out
ignore_errors: true
with_items:
- 192.168.153.31
- 192.168.153.32
- debug: var=ssh_out.results
- lineinfile:
line: "{{item.state}}"
path: /home/bindu/playbooks/salman/log/ssh_log
create: yes
loop: "{{ ssh_out.results }}"
I am seeing error like "'PermissionError' object is not subscriptable".
--
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/6648b122-8636-45cd-9af7-64323a58a365n%40googlegroups.com.