Re: [ansible-project] Need assistance to check if config is present in certain order in router

2021-05-17 Thread Dick Visser
No need for scripts, use the regex_search filter: https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#id40 On Tue, 18 May 2021 at 04:59, Vikram S wrote: > The output of 'sh run | i boot' shows 2 boot statements set in router. But > i need to write a script which will

[ansible-project] Need assistance to check if config is present in certain order in router

2021-05-17 Thread Vikram S
The output of 'sh run | i boot' shows 2 boot statements set in router. But i need to write a script which will check if '9.16.12.04.SPA.bin' is present specifically in 1st line followed by '...9.16.06.04.SPA.bin' specifically in 2nd line. I know to write a script to check if both

[ansible-project] Request assistance to extract partial output using RegEx

2021-05-17 Thread Vikram S
When i give 'sh version | i System image' in cisco router, it shows me below output. How do i extract only the image name - 'isr4300-universalk9.16.12.01.SPA.bin' from below output? ROUTER#sh version | i System image System image file is "bootflash:isr4300-universalk9.16.12.01.SPA.bin" I

[ansible-project] Request assistance to extract partial output using RegEx

2021-05-17 Thread Vikram S
When i give 'sh version | i System image' in cisco router, it shows me below output. How do i extract only the image name - 'isr4300-universalk9.16.12.01.SPA.bin' from below output? ROUTER#sh version | i System image System image file is "bootflash:isr4300-universalk9.16.12.01.SPA.bin" I

Re: [ansible-project] Use Ansible for Patch Management

2021-05-17 Thread Wei-Yen Tan
In response to your first question you can use facts to query the os type then pass it to the correct task. Ansible has patch tasks for many linux distributions. In regards to templates there are many examples in github repository. I can't recall on the top of my head. In response to your

Re: [ansible-project] Use Ansible for Patch Management

2021-05-17 Thread siliii
Okay sounds great. Are there any preconfigured templates or do I have to start from scratch? And with ansible I can manage to patch many different linux distributions like Ubuntu and SLES for SAP enterprise. Is that also correct? And how does it look like with support questions when I use

Re: [ansible-project] Use Ansible for Patch Management

2021-05-17 Thread Wei-Yen Tan
Yes all this can be done using ansible. Playbooks can be written to automate patch selection in your patch management system. Then your servers can be organised into groups. And then issued patch task. In between you can post in pre and post tasks Get Outlook for iOS

[ansible-project] Use Ansible for Patch Management

2021-05-17 Thread siliii
Hello Ansible community, I am new to the world of configuration management software (infrastructure as code). I currently manage a small Linux environment with 25 Linux servers and wanted to ask if there are any useful use cases to regularly deploy patches to the 25 Linux systems? In my

Re: [ansible-project] HP ILO Firmware info

2021-05-17 Thread Dick Visser
On Mon, 17 May 2021 at 19:54, NAVEEN wrote: > > How to declare that variable to resolve the issue? Judging by its name, it isn't defined manually, but rather the result of some previous task (which we don't know anything about). -- Dick Visser Trust & Identity Service Operations Manager

Re: [ansible-project] HP ILO Firmware info

2021-05-17 Thread NAVEEN
How to declare that variable to resolve the issue? On Mon, May 17, 2021, 23:12 Dick Visser wrote: > On Mon, 17 May 2021 at 19:30, NAVEEN wrote: > > > > Hello Guys , > > Need help.Written code as below , > > > > --- > > - hosts: localhost > > vars: > > iLo_IP: 'XXX' > >

Re: [ansible-project] HP ILO Firmware info

2021-05-17 Thread NAVEEN
Actually copied .few of them modified.. On Mon, May 17, 2021, 23:12 Dick Visser wrote: > On Mon, 17 May 2021 at 19:30, NAVEEN wrote: > > > > Hello Guys , > > Need help.Written code as below , > > > > --- > > - hosts: localhost > > vars: > > iLo_IP: 'XXX' > > iLo_username:

Re: [ansible-project] HP ILO Firmware info

2021-05-17 Thread Dick Visser
On Mon, 17 May 2021 at 19:30, NAVEEN wrote: > > Hello Guys , > Need help.Written code as below , > > --- > - hosts: localhost > vars: > iLo_IP: 'XXX' > iLo_username: 'test' > iLo_password: 'testuser' > tasks: > - name: Get iLO firmware version > uri: > url:

Re: [ansible-project] HP ILO Firmware info

2021-05-17 Thread Stefan Hornburg (Racke)
On 5/17/21 7:30 PM, NAVEEN wrote: > Hello Guys , > Need help.Written code as below , > >   --- > - hosts: localhost >   vars: >     iLo_IP: 'XXX' >     iLo_username: 'test' >     iLo_password: 'testuser' >   tasks: >   - name: Get iLO firmware version >     uri: >       url: "https://{{

[ansible-project] HP ILO Firmware info

2021-05-17 Thread NAVEEN
Hello Guys , Need help.Written code as below , --- - hosts: localhost vars: iLo_IP: 'XXX' iLo_username: 'test' iLo_password: 'testuser' tasks: - name: Get iLO firmware version uri: url: "https://{{ iLo_IP }}/rest/v1/managers/1" method: GET user:

Re: [ansible-project] Regardin MSSQL

2021-05-17 Thread Dick Visser
On Mon, 17 May 2021 at 18:02, karthik kumar wrote: > > What kind of script.Could you help me Not really, this is not a generic sysadmin support group. This list is for help with ansible, an automation tool. The "input" for ansible would be an existing, manual, or otherwise tedious task/process

[ansible-project] Re: python 'requests' module installed but ansible doesnt think it is

2021-05-17 Thread michael hill
Any progress on this thread? I am having this exact same issue. I'm assuming maybe Ansible or the plugin are looking in the wrong place for the 'request' module, but I'm not sure where to look so I can point it in the right direction. On Friday, February 26, 2021 at 4:46:59 PM UTC-6

Re: [ansible-project] Regardin MSSQL

2021-05-17 Thread karthik kumar
What kind of script.Could you help me On Monday, 17 May 2021 at 12:01:03 UTC-4 jatin@gmail.com wrote: > I think you can use some script to take database backup and call that > script from ansible. > > On Mon, May 17, 2021, 21:25 karthik kumar wrote: > >> Hello Team, >> Can Someone help me

Re: [ansible-project] Regardin MSSQL

2021-05-17 Thread Jatin Garg
I think you can use some script to take database backup and call that script from ansible. On Mon, May 17, 2021, 21:25 karthik kumar wrote: > Hello Team, > Can Someone help me how to automate this? Ansible to take MSSQL database > backup(windows). > > Thanks, > Karthik > > -- > You received

Re: [ansible-project] Regardin MSSQL

2021-05-17 Thread Antony Stone
On Monday 17 May 2021 at 17:55:03, karthik kumar wrote: > Hello Team, > Can Someone help me how to automate this? Ansible to take MSSQL database > backup(windows). Why? This sounds like the wrong tool for the job to me. I would suggest using the task scheduler. Antony. -- I love deadlines.

[ansible-project] Regardin MSSQL

2021-05-17 Thread karthik kumar
Hello Team, Can Someone help me how to automate this? Ansible to take MSSQL database backup(windows). Thanks, Karthik -- 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

[ansible-project] Re: Ansible raw module ASA

2021-05-17 Thread A. J. Nemeth
I use the raw module on most of my devices if I just want to issue a single command to one device.I could run a playbook. But find this easier. I use playbooks if I need to pull multiple devices. On Wednesday, May 12, 2021 at 2:37:05 AM UTC-4 sjai...@redhat.com wrote: > Hi, > > Is

Re: [ansible-project] Complex process to generate template/lineinfile data?

2021-05-17 Thread Brian Coca
plugins in general only get the variables they need, vars_plugins are supposed to generate them, not change them, so they get very little access to variables in general. For data manipulation you want to create a filter plugin, you still need to be explicit about the data you feed it. --

Re: [ansible-project] Complex process to generate template/lineinfile data?

2021-05-17 Thread Richard Hector
On 15/05/21 6:39 pm, Richard Hector wrote: Do I need to write a custom plugin of some kind? I'm experimenting with writing a vars plugin, referring to these: https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html

Re: [ansible-project] Unable to recall/display multiple register value in single ansible play book.

2021-05-17 Thread Jayan Anirudhan
Hi Racke, Thanks a lot for the guidance from your side. Finally it started working. Regards, Jayan On Mon, May 17, 2021 at 3:03 PM Stefan Hornburg (Racke) wrote: > On 5/17/21 11:06 AM, jaya...@gmail.com wrote: > > Hi Team, > > > > I want to register multiple values and to display the details

Re: [ansible-project] Unable to recall/display multiple register value in single ansible play book.

2021-05-17 Thread Stefan Hornburg (Racke)
On 5/17/21 11:06 AM, jaya...@gmail.com wrote: > Hi Team, > > I want to register multiple values and to display the details at the end. I > have created a small playbook with two > register value as mentioned below, but its display only single value instead > of two. Can some body guide me how

[ansible-project] Unable to recall/display multiple register value in single ansible play book.

2021-05-17 Thread jaya...@gmail.com
Hi Team, I want to register multiple values and to display the details at the end. I have created a small playbook with two register value as mentioned below, but its display only single value instead of two. Can some body guide me how to achieve this task. === playbook ---

[ansible-project] [Solved] Re: Is it possible to use ansible without root password ?

2021-05-17 Thread Lomic Legone
I eventually managed to contact the tuto's author who gave the response : Just replace --become-method=su by --become-method=sudo Le vendredi 7 mai 2021 à 11:40:01 UTC+2, Lomic Legone a écrit : > Hi all, I'm a newbee on ansible and I follow online tutos. > > I installed 2 ubuntu VM (named

Re: [ansible-project] short-circuit eval in templated string works only sometimes?

2021-05-17 Thread Scott Mcdermott
On Sun, May 16, 2021 at 2:26 PM Vladimir Botka wrote: > > > I cannot use a default because this whole thing is relying > > > on whether it's defined or not later to take different actions. > > > the fuller example is: > > > > > > - name: determine_subnet > > > when: > > > > project ==

Re: [ansible-project] short-circuit eval in templated string works only sometimes?

2021-05-17 Thread Scott Mcdermott
On Sun, May 16, 2021 at 1:51 PM Vladimir Botka wrote: > > I cannot use a default because this whole thing is relying > > on whether it's defined or not later to take different actions. > > the fuller example is: > > > > - name: determine_subnet > > when: > > > project == project_bake > >