[ansible-project] Re: Some user of ansible_user

2019-08-20 Thread Zolvaring
Ah I missed your detail about serial usage, but am not sure how you could do that. You could import or include a play with some sort of loop, or maybe registering a var after the final task and setting ansible_ssh_user to that var if it exists prior to the first task? -- You received this mess

[ansible-project] Re: Some user of ansible_user

2019-08-20 Thread Zolvaring
I'm confused what you want to do when you use a second user. If you want fallback users, I don't know of a simple built in way but have gotten it to work looping user/pass /key combos with gather facts or a shell "sudo -l" command and register. Then loop through your registered var with set_fact

[ansible-project] Re: Some user of ansible_user

2019-08-20 Thread Karther
hey, Help please Community Ansible ;) Regards, Le mardi 20 août 2019 17:00:33 UTC+2, Karther a écrit : > > Hey, > > I want to know if possible use a lot of user for ansible. > > Exemple, if i use *ansible_user=user1, user2* > > because i want to use *serial: 1* > > And i want that ansible

Re: [ansible-project] Need Help!!!!

2019-08-20 Thread Jyotsna Mehta
Hello Jonathan, I am new at this -- This is what I have created so far --- - name: Restart a service win_service: name: LoadRunnerAgent state: restarted username: domain\user password: pwd On Tuesday, August 20, 2019 at 3:33:37 PM UTC-4, Jonathan Lozada De La Matta wrote: >

[ansible-project] yum history

2019-08-20 Thread Amos
So, in bash I can get some info from 'yum history'. Get the last 'yum update': yum history | grep Update | head -1 Get the very last call to yum: yum history | awk '/^/{ n=NR+1 }n && n<=NR && NR<(n+1){ print }' How do I parse that with an ansible regex? -- You received this message becau

Re: [ansible-project] Need Help!!!!

2019-08-20 Thread Jonathan Lozada De La Matta
Jyotsna, Can you share what you have so far? On Tue, Aug 20, 2019 at 3:32 PM Jyotsna Mehta wrote: > Can someone help me create a playbook that restarts windows based load > runner service on multiple windows servers? > > -- > You received this message because you are subscribed to the Google Gr

[ansible-project] Need Help!!!!

2019-08-20 Thread Jyotsna Mehta
Can someone help me create a playbook that restarts windows based load runner service on multiple windows servers? -- 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 emai

Re: [ansible-project] Ansible and Satellite 6.4 - Waiting for Promote To Finish

2019-08-20 Thread Jonathan Lozada De La Matta
Cade, Check out https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html There's delays, retries etc. You can use any of this to accomplish what you want. On Tue, Aug 20, 2019 at 1:29 PM Cade Lambert wrote: > I created a playbook to connect to Satellite via API, publish new conte

[ansible-project] Ansible and Satellite 6.4 - Waiting for Promote To Finish

2019-08-20 Thread Cade Lambert
I created a playbook to connect to Satellite via API, publish new content views, and promote the various lifecycle environments to these new Content View versions, looping through a list of Lifecycle Environments. The issue I'm having is I can't figure out a way for my task to wait until the p

[ansible-project] Re: execute one task of a playbook locally and the rest on the remote hosts?

2019-08-20 Thread Zolvaring
I think what you're looking for is the 'delegate_to' task parameter. If you wanted the local action to only run once you can combine this with the 'run_once' task parameter -- for your example - name: bring file locally command: scp "{{qahost}}":"{{remotepath}}" "{{localpath}}" delega

[ansible-project] rksh does not allow me to run /bin/sh -c so ansible failes

2019-08-20 Thread Tom Van de Velde
Hi, I want to use Ansible to a target using an ssh connection and a restricted shell I have setup gather_facts: false in my playbook, but even then Ansible is trying to guess the discovered_interpreter_python and returns an error because this is not allowed in the restricted shell. Att

Re: [ansible-project] Re: execute one task of a playbook locally and the rest on the remote hosts?

2019-08-20 Thread Karl Auer
Haven't checked this, but I think you can have multiple sections in a playbook with different hosts. Maybe not. Try - hosts: localhost ... - hosts: something_else ... I assume (always dangerous) that if it works at all the hosts sections would be processed in order, so you could rely on th

[ansible-project] Some user of ansible_user

2019-08-20 Thread Karther
Hey, I want to know if possible use a lot of user for ansible. Exemple, if i use *ansible_user=user1, user2* because i want to use *serial: 1* And i want that ansible use firt user1 and secondaly user2 If possible or not please ?? Regards, -- You received this message because you are subsc

[ansible-project] Re: execute one task of a playbook locally and the rest on the remote hosts?

2019-08-20 Thread Mike Eggleston
That's a great idea. Thank you. Mike -- 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

[ansible-project] Re: execute one task of a playbook locally and the rest on the remote hosts?

2019-08-20 Thread Auralan
Hi, One way to do this is to append your tasks with a when statement in conjunction the special variables i

Re: [ansible-project] Problem with get indice in file

2019-08-20 Thread Karther
Hey, Help me please !!! :) If i change this task with lookup, i will be to change my whole program !!! ;( Regards, Le mardi 20 août 2019 15:49:47 UTC+2, Karther a écrit : > > Hey, > > This module not work !! :/ > > I have error synthax i don't understand why !! :/ > > Can you help me for my fi

[ansible-project] Re: best practices re ansible-playbook inventories and group_vars

2019-08-20 Thread Jim Robinson
A coworker sent me this thread: https://stackoverflow.com/questions/40606890/how-to-share-group-vars-between-different-inventories-in-ansible I like the description from ceving (direct link: https://stackoverflow.com/a/47798704) -- You received this message because you are subscribed to the Go

Re: [ansible-project] Problem with get indice in file

2019-08-20 Thread Karther
Hey, This module not work !! :/ I have error synthax i don't understand why !! :/ Can you help me for my first message please with this task : - set_fact: indice: "{{ indice|default([])|union(item.split(',')[0]|list) }}" with_lines: cat /home/ansible/ssh_manager/clef_applicatives.csv

[ansible-project] execute one task of a playbook locally and the rest on the remote hosts?

2019-08-20 Thread Mike Eggleston
I'm working on a playbook to deploy an internal application to internal hosts. This application is delivered by development to QA in a *.tar.gz file. The file is staged and deployed to QA (by me) in that *.tar.gz file. What I would like/am thinking of is something like: $ ansible-playbook remot

Re: [ansible-project] Problem with get indice in file

2019-08-20 Thread Dick Visser
Hi On Tue, 20 Aug 2019 at 14:39, Karther wrote: > - set_fact: > indice: "{{ indice|default([])|union(item.split(',')[0]|list) }}" > with_lines: cat /home/ansible/ssh_manager/clef_applicatives.csv > when: item.split(',')[2] == inventory_hostname Stop doing that. There is a dedicated m

[ansible-project] Re: Problem with get indice in file

2019-08-20 Thread Karther
Hey, Update. The problem is that when i use number with same caractere exemple "11, 22, 33, 44, 55 , etc ..." This task get only the first caracter "1 or 2 or 3 or 4 , etc..." Thanks, Regards, Le mardi 20 août 2019 14:39:45 UTC+2, Karther a écrit : > > Hey ! > > I have strange problem : > > I

[ansible-project] Problem with get indice in file

2019-08-20 Thread Karther
Hey ! I have strange problem : I have on file "clef_applicatives.csv" with this content : 2,user1,host1,clef1 7,user3,host2,clef5 6,user4,host4,clef6 42,user5,host5,clef7 23,user6,host8,clef8 3,user7,host3,clef9 22,user8,host10,clef14 20,user9,host7,clef11 I have on task who get indice dependin

Re: [ansible-project] Re: win_dsc UrlAcl and passing int[]

2019-08-20 Thread 'Richard Payne' via Ansible Project
You were right Jordan. I have to say, I really dislike the use of quotes here. It is really not intuitive what data you are passing. Thanks for everyone's help. On Monday, 12 August 2019 08:11:29 UTC+1, Richard Payne wrote: > > I thought so, but will try again to confirm. > > On Friday, 9 Augu