[ansible-project] expect module

2021-09-30 Thread Hanumantha Reddy Basireddy
Hello All, trying to understand expect functionality using below piece of code... I know I can do using becom_user, but I would like to check expect module... since there is requirement where I need to use expect module for automating client app CLI tasks: - name: testing expect exp

[ansible-project] become root user using custom command in ansible

2021-11-23 Thread Hanumantha Reddy Basireddy
Hello All, In target server need to run a command like "mcs cmh" which prompts for password to become root user... how can I achieve the same in become method? Thanks, BHR. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe fr

[ansible-project] lineinfile is skipped if one of the task ignored

2021-07-19 Thread Hanumantha Reddy Basireddy
Hi All, I have a playbook as follows: --- - hosts: all gather_facts: no ignore_unreachable: true tasks: - command: "{{ item }}" loop: - "ls" - "df -h" register: files ignore_errors: true - name: delegate command: ls register: files2 delegate_to: "{{i

[ansible-project] Re: lineinfile is skipped if one of the task ignored

2021-07-19 Thread Hanumantha Reddy Basireddy
Hello All, Any leads On Monday, July 19, 2021 at 1:17:35 PM UTC+5:30 Hanumantha Reddy Basireddy wrote: > Hi All, > I have a playbook as follows: > > --- > - hosts: all > gather_facts: no > ignore_unreachable: true > > tasks: > - command: "{{

[ansible-project] ansible loop through command for multiple hosts

2021-09-03 Thread Hanumantha Reddy Basireddy
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: