Hi Pushp,
Script worked but desired outcome not achieved. still getting output of
only 1st command ( show ip name-servers) in the file.
- name: Check Ip routes
hosts: routers
gather_facts: false
connection: local
vars:
cli:
username: "{{ hdn_user_rw }}"
password: "{{
There is a indentation error in your playbook
- name: save output to a file
lineinfile:
create: yes
line: "{{item}}"
path: /opt/ansible/dev/Dheeraj/verf/adnan/Log/{{ inventory_hostname
}}.txt
with_items: "{{ print_output.stdout[1] }}"
On Tue, Jun 1, 2021
Hi Pushpraj,
I am getting the error below if i try to run this with lineinfile as per
suggestion.
Please see my playbook as attached. Appreciate your help
---
- name: Routers data
hosts: routers
gather_facts: false
connection: local
vars:
cli:
username: "{{ hdn_user_rw }}"
On 31.05.21 15:33, 'Marcus Hayhurst' via Ansible Project wrote:
> Hello everyone,
>
> I'm attempting to get a list of information of all my machines to send
> in an email:
>
> *Hostname - OS (and) Version *
>
> so essentially:
>
> *{{ ansible_hostname }} - {{ ansible_distribution }} {{
>
Can you try this
Use this to write several strings into a file:
- name: save output to a file
lineinfile:
create: yes
line: "{{item}}"
path: ./output/{{ inventory_hostname }}.txt
with_items: "{{ print_output.stdout[1] }}"
On Mon, May 31, 2021 at 11:28 AM Djay wadhwa wrote:
>
Yes, ios_config does not support prompting, Can you disable prompting and
re-enable once a task is done?
On Mon, May 31, 2021 at 4:55 PM R.B. Kumar wrote:
> I got the answer from another forum. It is just a workaround only using
> cli_command module
>
> I read ansible 2.7 dont support prompt in
Can you show me the error message?
On Mon, May 31, 2021 at 7:03 PM 'Marcus Hayhurst' via Ansible Project <
ansible-project@googlegroups.com> wrote:
> Hello everyone,
>
> I'm attempting to get a list of information of all my machines to send in
> an email:
>
> *Hostname - OS (and) Version *
>
>
Hello everyone,
I'm attempting to get a list of information of all my machines to send in
an email:
*Hostname - OS (and) Version *
so essentially:
*{{ ansible_hostname }} - {{ ansible_distribution }} {{
ansible_distribution_version }}*
I tried something like this but it does not work:
-
For those who are using the juniper playbooks, is it me or the
only way to create/edit rule-sets in ansible is to, for instance, have
a template of the relevant session (or the entire config) and replace
it as needed?
--
You received this message because you are subscribed to the Google
I got the answer from another forum. It is just a workaround only using
cli_command module
I read ansible 2.7 dont support prompt in ios_config.
We need to user ios_command with loop as below
- name: delete_crypto_map
cli_command:
command: "{{ item }}"
prompt:
- "Are you sure
Can anybody have requirement similar to this? I tried with cli_command,
ios_command too..
On Monday, May 31, 2021 at 2:15:09 AM UTC+5:30 R.B. Kumar wrote:
> Hello All - Using Ansible v2.7
> I am tying to execute Cisco IOS commands that prompts to type Y/N. Looks
> like the *Prompt: *is
Dear Team,
How to install the .exe package through Ansible. MSI is working fine
looking for your valuable comments
--
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
12 matches
Mail list logo