Hi!
Can anyone help me build this playbook?
how can i fetch this information from my orion windows-based server?
--
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
*Hi guys*.
*This is my code*:
---
- name: Multi-line shell
win_shell:
## Creating Scopes
Add-DhcpServerv4Scope -Name "{{ hebrew_site_name }}" -StartRange "{{
DHCP_computers_segment }}.61" -EndRange "{{ DHCP_computers_segment }}.243"
-SubnetMask "255.255.255.0" -LeaseDuration
Hi Thanks for your answer.
Thanks to you my problem is solved.
I had to install certificate in the windows host side and then use ntlm
transport and ignore cert_validation.
These made it work.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project"
Hi guys!
I have issues with ansible ping (python module validation) with Windows
Server 2019 host.
This is the result:
[ansible@Netauto-Dev new_branch]$ ansible dhcp-test -m ping -
2020-02-20 14:37:56,686 p=ansible u=123991 | ansible 2.9.1
config file = /etc/ansible/ansible.cfg
Hi,
I want to create ansible automation for create IPv4 pools on Windows Server
2019 operating system.
This is where I want to add the pool:
[image: Capture.PNG]
>From what I understand I have two options I could do that:
1. Is to the find dhcpmgmt built-in Ansible module which is
Hi guys!
Solved.
Solution:
qos_policy: "{{ 'qos-nested-50m' if bandwidth_mb == 50 else
'qos-nested-new-' ~ bandwidth_mb ~ 'm' }}"
Thanks for all replys.
Peace out.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this
Hi!
Both solutions given are not working for some reason..
Any other suggestions?
--
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
*Hi!*
*I want to make the variable qos_policy set on conditional basis:*
*If bandwidth_mb == '50'*
* then qos_policy == 'qos-nested-50'*
*else*
* qos_policy == 'qos-nested-new-50'*
*My code is this (not working):*
qos_policy: "{{ 'qos-nested-new-' + bandwidth_mb }}"
qos_policy: "{{
*Hi!*
*I want to make the variable qos_policy set on conditional basis:*
*If bandwidth_mb == '50'*
* then qos_policy == 'qos-nested-'*
*else*
* qos_policy == 'qos-nested-new-'*
*My code is this (not working):*
qos_policy: "{{ 'qos-nested-new-' + bandwidth_mb }}"
qos_policy: "{{
Yea you are right. I am hitting this bug and I can't see myself pulling
this off.
I'll just go with the pubkey method although I wanted to avoid it because I
have lots of network devices. But no choice here because Ansible is not
going to work without SSH keys on these IOS versions.
FYI,
This
[ansible@Netauto-Dev new_vlan]$ ansible -m ios_command -e commands='sh ip
int br' -i /etc/ansible/inventory/ R-TEST-SNIF -e
'ansible_connection=network_cli' -e 'ansible_network_os=ios' -e
'remote_user=ansible' -k
SSH password:
[WARNING]: Found variable using reserved name: remote_user
Hi!
To simplify stuff I am troubleshooting this problem with the command below:
ansible -m ios_command -e commands='sh ip int br' -i
/etc/ansible/inventory/ R-TEST-SNIF -e 'ansible_connection=network_cli' -e
'ansible_network_os=ios' -u ansible -k
It will make it easier to troubleshoot this
1. Yes. remote_user is already set on ansible.cfg file:
# SSH timeout
#timeout = 10
# default user to use for playbooks if user is not specified
# (/usr/bin/ansible will use current user as default)
remote_user = ansible
# logging is off by default unless this path is defined
# if so defined,
Hi!
I have found out that some IOS devices have problems with gather_facts and
ansible does that by default. So I disabled it with gather_facts=no and now
ansible continues to the next step now without gathering facts and skips
the ios_facts error.
Also I have changed some paramiko config on
*Hi Phil,*
*Thank you for your help.*
*Playbook:*
- name:
--- 1. Applying Layer 2 Configuration ---
hosts: Snif_TEST
connection: network_cli
tasks:
- include_vars:
dir: /etc/ansible/roles/new_vlan/vars/
- include_role:
name:
I think it has something to do with the publickey and that ansible tries to
authenticate using the public key as primary method of authentication.
For some reason it doesn't takes the username and password and just attempt
SSH with it.
I think that because of the log file.
--
You received
Hi again.
Anyone have any idea?
--
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the
Hi Douglas,
This is the result of --ask-pass:
[image: Capture.PNG]
I have no idea what that means haha. What do you think?
--
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,
*I have no idea what to do next.. also ping check fails..*
[image: Capture.PNG]
*Again, if im adding the publickey for passwordless authentication Ansible
works.. but without it its not..*
*This is the configuration on the router side:*
R-TEST-SNIF#sh run
Building configuration...
Current
I'm not sure that "connection: network_cli" because not matter what i do I
get the same error... Its just not working.
How is it SSH problem if I can add a public key or just regulary SSH and
its working? that proves that its not an SSH problem on my remote machine
and leaves the fault in
*Hi Vladimir,*
*with this code on the playbook:*
---
- name:
--- 1. Applying Layer 2 Configuration ---
hosts: Snif_TEST
connection: network_cli
tasks:
- include_vars:
dir: /etc/ansible/roles/new_vlan/vars/
- include_role:
name:
*Oh. of course.*
*The router is virtual image - IOL.*
*Cisco IOS Software Version 15.4(1)T (I86BI_LINUX-ADVENTERPRISEK9-M)*
*Full code is:*
*/etc/ansible/roles/new_vlan/new_vlan_playbook.yml:*
---
- name:
--- 1. Applying Layer 2 Configuration ---
hosts:
Hi Vladimir,
The device is a router, and I have made few more checks:
1. If im sshing normaly with ansible:ansible credentials it works
2. If im installing ssh keypair (publickey on the router) the ansible is
working.
Problem occurs once I take off the public key from the router and try to
>
> Hi Vladimir,
The device is a router, and I have made few more checks:
1. If im sshing normaly with ansible:ansible credentials it works
2. If im installing ssh keypair (publickey on the router) the ansible is
working.
Problem occurs once I take off the public key from the router and try
*Hi,*
*Thank you for your answer. but its still not working*
*This is how my code looks like now:*
ansible_ssh_common_args:
-o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts
ansible_user: ansible
ansible_password: ansible
*And here is my error now:*
*Hi,*
*Thank you for your answer. but its still not working*
*any idea why? *
*here is my error now:*
[ansible@Netauto-Dev new_vlan]$ ansible-playbook new_vlan_playbook.yml
-v
ansible-playbook 2.9.1
config file = /etc/ansible/ansible.cfg
configured module search path =
*Hi!!*
*Here is my code on my /etc/ansible/roles/new_vlan/vars/new_vlan_vars.yml
file:*
ansible_ssh_common_args:
-o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts
ansible_user: ansible
ansible_pass: ansible
*I want to disable the SSH authenticity of host check, and I
Solved.
Solution:
- ios_config:
lines:
- interface Ethernet0/1.{{ vlan_id }}
- encapsulation dot1q {{ vlan_id }}
- ip address {{ wan_ip }}
- no shutdown
save_when: "{{ do_write }}"
when: CONFIG_STATE == "present"
Thanks to me :D
--
You
רביעי, 8 בינואר 2020 בשעה 09:58:16 UTC+2, מאת Yehuda Pinhas:
>
> Hi again!
>
> This is the code of the task configure_som_tlv5 inside the role new_branch:
> - ios_config:
> lines:
> - interface Ethernet0/1.{{ vlan_id }}
> - encapsulation dot1q {{
Hi again!
This is the code of the task configure_som_tlv5 inside the role new_branch:
- ios_config:
lines:
- interface Ethernet0/1.{{ vlan_id }}
- encapsulation dot1q {{ vlan_id }}
- ip address {{ wan_ip }}
- no shutdown
save_when: "{{ do_write }}"
Thank you vladimir!
working now
בתאריך יום שלישי, 7 בינואר 2020 בשעה 16:34:47 UTC+2, מאת Vladimir Botka:
>
> On Tue, 7 Jan 2020 05:41:12 -0800 (PST)
> Yehuda Pinhas > wrote:
>
> > qos_policy: qos-nested-new-10m
> >when: "{{ bandwidth_mb }} == '10'"
Hi guys!
This is my code:
---
qos_policy: qos-nested-new-10m
when: "{{ bandwidth_mb }} == '10'"
qos_policy: qos-nested-new-20m
when: "{{ bandwidth_mb }} == '20'"
Modify:
bandwidth_mb: 10
*I'm trying to create a condition for the qos_policy variable:*
if bandwidth_mb = 10
Hi Vladimir,
Thank you! working now.
בתאריך יום שני, 6 בינואר 2020 בשעה 18:29:10 UTC+2, מאת Vladimir Botka:
>
> On Mon, 6 Jan 2020 05:22:37 -0800 (PST)
> Yehuda Pinhas > wrote:
>
> > all:
> > children:
> > POC_ENV:
> > hosts:
> &g
Hi guys!
Inventory POC_ENV.yml file:
all:
children:
POC_ENV:
hosts:
TEST-NXOS2
TEST-NXOS3
vars:
ansible_ssh_private_key_file: /home/ansible/.ssh/id_rsa
ansible_ssh_common_args:
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
ansible_user:
Last question.
How can I do that correctly?
---
- name: Playing VLAN Configuration
hosts: POC_ENV
connection: local
vars:
vlan_id: 999
vlan_name: TEST_VLAN_TEST
tasks:
- include_role:
name: vlan_creation
tasks_from: show_vlan.yml
Hi Jon,
Thank you so much, it's working now.
Also, much thanks Vladimir for his assistance.
Take care.
--
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
*Hi,*
*I have followed the instruction and it's working so my inventories are now
working like I wanted. My end goal is to ssh to the specified machine in
POC_ENV inventory (TEST-AGG-SW) and run the command "show vlan brief" and
return it to stdout.*
*For some reason it is not working and im
where it is looking for inventory and
> what plugins it is using to parse and load your inventory.
>
> Hope this helps,
>
> Jon
>
> On Tuesday, December 31, 2019 at 10:13:25 AM UTC, Yehuda Pinhas wrote:
>>
>> Hi J Hawkesworth,
>> Can you explain exactly i
show you where it is looking for inventory and
> what plugins it is using to parse and load your inventory.
>
> Hope this helps,
>
> Jon
>
> On Tuesday, December 31, 2019 at 10:13:25 AM UTC, Yehuda Pinhas wrote:
>>
>> Hi J Hawkesworth,
>> Can you expla
Hi J Hawkesworth,
Can you explain exactly in which file do I need to add what code?
Considering I have the inventories POC_ENV.yml, avaya.yml, nexus.yml for
example. What file do I need to edit? the ansible.cfg and the inventory
file? can you provide the exact solution?
currently my
>
>
> Alright!
Thanks for your help so far, now it's working without errors.
Ignore previous messages and lets talk about the current status.
The result I get is:
[image: Ansible add vlans errors.PNG]
The result I'm expecting to see is that the ansible will run on each line
inside
>
> Alright so this is how my playbook looks like now:
-
name: Playing VLAN Configuration
hosts: localhost
# connection: local
vars:
vlan_id: 999
vlan_name: TEST_VLAN_TEST
my_hosts:
- group: 'POC_ENV'
hosts:
"{{
>
> Hi,
>
Can you please take a look on my errors and try to help me figuring out why
I am getting them?
This is my inventory code:
- hosts: localhost
vars:
my_hosts:
- group: 'POC_ENV'
hosts: "{{ lookup('file',
>
> Hi again,
Thanks a lot for your reply.
I still don't understand what these code lines used for in my case:
tasks:
- add_host:
name: "{{ item.1 }}"
groups: "{{ item.0.group }}"
loop: "{{ lookup('subelements', my_hosts, 'hosts') }}"
can you please
Hi,
I have been searching all over the internet and there isn't any good
documentation that explains how to build my inventory properly. The
official documentation is bad and there aren't any example on inet that I
could find.
Can you please help me? I need to build inventory file that
45 matches
Mail list logo