[ansible-project] Is it possible to avoid aborting a play if all hosts in a serial batch fail?

2018-02-28 Thread Daniel Heffner
So, for example, i have a playbook: - hosts: some_hosts serial: 50 roles: - some_role ... some other play with different hosts and for some reason, all 50 hosts in a batch fail. I want to continue running the play on the rest of the hosts in the some_hosts group, and continue on to the

[ansible-project] Re: kerberos: Bad HTTP response returned from server. Code 400

2018-02-28 Thread Jordan Borean
Are you able to try port 5986 and see if that works. Potentially port 5985 is failing because the encryption process is creating a bad request causing the 400 but it would be good to know if your setup works with HTTPS where WinRM encryption isn't happening. Thanks Jordan -- You received

Re: [ansible-project] How to ignore the failed plays, not just failed tasks ?

2018-02-28 Thread Daniel Heffner
I'll probably make my own post because this post is so old, but it is the same topic, so... Is there a way to avoid aborting the run when all hosts in a serial batch have failed? On Friday, May 10, 2013 at 8:33:29 AM UTC-5, Michael DeHaan wrote: > > The whole play will only fail and abort the

Re: [ansible-project] Is it possible to avoid aborting a play if all hosts in a serial batch fail?

2018-02-28 Thread Brian Coca
Yes, that is the default, not sure how serial 50 helps with the memory then, as Ansible always uses the lowest number of the 2. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and

Re: [ansible-project] Is it possible to avoid aborting a play if all hosts in a serial batch fail?

2018-02-28 Thread Brian Coca
That is because serial is specifically set to kill play if all hosts in a batch fail, mail_fail_percentage is calculated on the serial batch, not the full list of hosts for the play. I would ask, why are you using serial if you don't want the feature? -- -- Brian Coca -- You received

[ansible-project] Re: kerberos: Bad HTTP response returned from server. Code 400

2018-02-28 Thread 'J Hawkesworth' via Ansible Project
Just wondering if this is a transient error? I have occasionally had problems when the windows host is applying windows updates or running ngen to recompile dotnet code following installation of an upgrade to dotnet framework. Jon -- You received this message because you are subscribed to

Re: [ansible-project] Is it possible to avoid aborting a play if all hosts in a serial batch fail?

2018-02-28 Thread Daniel Heffner
also, the documentation specifically says that max_fail_percentage needs to be exceeded. you can't exceed 100%, so I hoped that would work. I suppose this behavior is nonsensical to me. If I was baking cookies and got halfway through the dough when I completely burned one batch, I wouldn't just

Re: [ansible-project] Is it possible to avoid aborting a play if all hosts in a serial batch fail?

2018-02-28 Thread Daniel Heffner
isn't the default forks=5? it doesn't seem like increasing the number of parallel processes would address the issue of running g out of memory while parsing text output from hundreds of hosts On Feb 28, 2018 6:33 PM, "Brian Coca" wrote: > If you are doing it for memory issues,

[ansible-project] "Unable to open shell" when not running playbook as sudo

2018-02-28 Thread Bryan Bartik
I have a playbook that backups router configs using the ios_config module. When I run the command as sudo it works but the files it creates are owned by root. I want them owned by me. However when I run the ansible-playbook command without sudo it fails and gives the errors below. Any ideas

[ansible-project] Ansible 2.3.4 RC1 is available for testing

2018-02-28 Thread James Cammarata
​​Hi all, we're happy to announce that rc1 for 2.3.4 is now available for testing. This release mainly addresses https://github.com/ansible/ansible/pull/19712, which was fixed but had not previously been backported to the 2.3.x releases. How do you get it?

Re: [ansible-project] Is it possible to avoid aborting a play if all hosts in a serial batch fail?

2018-02-28 Thread Brian Coca
If you are doing it for memory issues, I believe you just want --forks 50 instead. -- -- Brian Coca -- 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

Re: [ansible-project] Is it possible to avoid aborting a play if all hosts in a serial batch fail?

2018-02-28 Thread Brian Coca
Yes, but if you set --forks 500 and serial 50, ansible will only fork on the lower number, this is sometimes used as a fork limiter (incorrectly) which is what i assumed you were doing. Serial will batch the hosts to run through play, but that should not create less/more memory consumption unless

Re: [ansible-project] Is it possible to avoid aborting a play if all hosts in a serial batch fail?

2018-02-28 Thread Daniel Heffner
short answer, I'm trying to solve an issue where I run out of memory parsing output by limiting the number of hosts being processed at one time. isn't the feature of serial the ability to run through hosts in batch, not the behavior of killing a playbook run if some of the hosts fail? On Feb 28,

Re: [ansible-project] How to ignore the failed plays, not just failed tasks ?

2018-02-28 Thread Brian Coca
No, that is the 'serial' feature itself, to kill play if all the hosts in a batch fail. -- -- Brian Coca -- 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

Re: [ansible-project] Is it possible to avoid aborting a play if all hosts in a serial batch fail?

2018-02-28 Thread Daniel Heffner
serial=50 means than instead of trying to parse and hold in memory text output from over 500 hosts, you only have to do it for 50 at a time. unless the documentation is severely confusing, forks and serial are not the same thing. forks is number of hosts to run in parallel, serial is how many

Re: [ansible-project] Is it possible to avoid aborting a play if all hosts in a serial batch fail?

2018-02-28 Thread Daniel Heffner
that's a good point, and it indicates that I'm probably barking up the wrong tree with serial and I just need to increase the memory on the VM. it doesn't answer why there's no way to set a playbook to continue even if a serial batch fails, but I suppose that's irrelevant to me now. On Feb 28,

Re: [ansible-project] Ansible 2.5.0 Release Candidate 1 is available

2018-02-28 Thread mattdavi
Tag support in 2.5.0 is passing all the integration tests, so I'd be surprised if it's not working, but If you've got a reproducible issue, please file it on Github. On Saturday, February 24, 2018 at 6:34:41 AM UTC-8, Michael Ströder wrote: > > wrote: > > Hi all- we're happy to announce that

[ansible-project] Access the value of -u flag in ansible role

2018-02-28 Thread Sahil Sawhney
Is there a way by which we can access the value of the flags (especially the *--private-key* and *-u* flags) we provide while running the ansible script; inside the ansible role? Thanks -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

Re: [ansible-project] Is it possible to avoid aborting a play if all hosts in a serial batch fail?

2018-02-28 Thread Daniel Heffner
so let's pretend the task list is 1. ssh to the host and execute a command that returns a large amount of text 2. parse that text into json 3. send the json to an API consider the difference between holding 50 objects that each take up 5 mb and possibly over 500 objects that each take up 5 mb.

[ansible-project] Re: kerberos: Bad HTTP response returned from server. Code 400

2018-02-28 Thread mattdavi
On a related note: maybe try just tweaking the existing setup to use `ansible_winrm_message_encryption=never` on your Windows host(s) in the inventory or via `-e` to prove if it's related to the new message encryption support. You've clearly been running unencrypted in the past- we'll leave

Re: [ansible-project] Is it possible to avoid aborting a play if all hosts in a serial batch fail?

2018-02-28 Thread Brian Coca
That assumes ansible does not hold registred data until the end of the run, but instead clears it when the host is done in play, that is an incorrect assumption. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

[ansible-project] Unarchive faild with spring boot war archive

2018-02-28 Thread Jan-Philipp Bolle
Hi there I try to unarchive several war archives. Mysteriously this fails only with war achives created by the maven spring boot plug-in (I expect this is the problem). All my war achives can extract with the normal zip command. I can reproduce this behavior with an ad-hoc command ansible

Re: [ansible-project] Ansible SSH "stderr": "reboot: Need to be root"

2018-02-28 Thread Kai Stian Olstad
On 28.02.2018 06:10, Hemant Kulkarni wrote: I need to reboot my servers using ansible ,my Problem is i dont have sudo user , i have normal user and root password .. admin = normal user here is my simple playbook ... - hosts: unix tasks: - name: reboot servers command: /sbin/reboot

Re: [ansible-project] pretty printing 'complete' dictionary vars in a file after reading from a list of dicts

2018-02-28 Thread ishan jain
Hi, More indentation doesn't work. Maybe i should think of some other approach entirely. Thanks for your help. BR, Ishan On Tuesday, 27 February 2018 17:22:25 UTC+1, Kai Stian Olstad wrote: > > On Tuesday, 27 February 2018 16.54.17 CET ishan jain wrote: > > Hi, > > > > To add markers in all

[ansible-project] Figuring out playbook_vars_root

2018-02-28 Thread Jean Helou
I am trying to understand what playbook_vars_root does in Ansible 2.4.3, I have the feeling that it is totally ignored According to the documentation : > This sets which playbook dirs will be used as a root to process

[ansible-project] Re: Figuring out playbook_vars_root

2018-02-28 Thread Jean Helou
Looking further into this I find conflicting information (maybe I understand it all wrong) In https://github.com/ansible/ansible/issues/33177#issuecomment-356976272 ("when including playbook, group_vars of original playbook are ignored") @sivel says : We have discussed this in the Core Team

[ansible-project] Re: Ansible SSH "stderr": "reboot: Need to be root"

2018-02-28 Thread Hemant Kulkarni
Hello, Just an Update , I did small change in my Play boot ... --- - hosts: unix become: true become_method: su become_user: root tasks: - name: reboot servers command: /sbin/reboot it seem to working ... any way thanks for looking in to it On Wednesday, February 28, 2018

Re: [ansible-project] Re: backing up a cisco device using telnet

2018-02-28 Thread 'Daley Okuwa' via Ansible Project
it is me again I just amended my YAML scripts still having errors I have use lint to check the spacing and indenting and it looks fine My code --- hosts: cisco connection: local gather_facts: False ignore_errors: yes tasks: - name: run show command via Telnet telnet: user: "{{

Re: [ansible-project] pretty printing 'complete' dictionary vars in a file after reading from a list of dicts

2018-02-28 Thread senorsmile
I have done similar things. With enough "experimentation", you can get it right. Here's an example from a recent project: --- all: vars: randomkey: "1" # set this first to override {% for k in inventory_data.key1.key2["key3-with-dashes"] -%} {% set v =

[ansible-project] how can i execute the following oracle sql commands using ansible and get the value back to be stored in variable

2018-02-28 Thread Gopi Krishna
HI, MY playbook: sample.sh: . /u05/oracle/VISEBS/12.1.0/VISEBS_sal-devtl10.env val='v$archived_log' R=`sqlplus '/as sysdba'< 0; exit; EOF` echo $R I am trying to achieve the same through ansible using shell command, but im getting the error - hosts: source tasks: - include_vars:

[ansible-project] kerberos: Bad HTTP response returned from server. Code 400

2018-02-28 Thread jn . bedag
Hi there Never had this error before, and also Google could not help me so far. When I create a new virtualenv and install pip modules, I get the mentioned error when I try to manage Windows hosts with Ansible. I'm on debian 8.9. Steps to reproduce: cd ~ virtualenv venv_ansible .

[ansible-project] Re: Ansible SSH "stderr": "reboot: Need to be root"

2018-02-28 Thread Hemant Kulkarni
Thanks for your Views ... I tried that but it seem same error ... below is my playbook . --- - hosts: unix become: yes become_method: su tasks: - name: reboot servers command: /sbin/reboot error -- TASK [reboot servers]