[ansible-project] Re: k8s module - TypeError: argument of type 'NoneType' is not iterable

2020-02-05 Thread Jason Gilfoil
tem is not none delegate_to: localhost On Tuesday, February 4, 2020 at 11:50:56 PM UTC-5, Jason Gilfoil wrote: > > Hello, > > Trying to apply a yaml definition using the k8s module to my cluster. I've > never used this module before so i'm trying to w

[ansible-project] k8s module - TypeError: argument of type 'NoneType' is not iterable

2020-02-04 Thread Jason Gilfoil
Hello, Trying to apply a yaml definition using the k8s module to my cluster. I've never used this module before so i'm trying to work out if i'm just doing something wrong or is this a bug? playbook: --- - hosts: kube-master[0] become: no tasks: - name: Install simple app k8s:

Re: [ansible-project] ansible 2.5 with_items -> loop conversion

2019-08-14 Thread Jason Gilfoil
ake a nested list > of lists, and flatten it. loop does not do flattening, and by using the > `-` on a new line, indicates that you are creating a list element in YAML. > > I cannot necessarily answer your numbers vs characters question, without > more context. > > On Tue, Aug

[ansible-project] ansible 2.5 with_items -> loop conversion

2019-08-13 Thread Jason Gilfoil
So I've been looking at the porting guide for 2.5 (i'm going from 2.4 to 2.7). I have this task that outputs a list of version numbers as strings and registers the output. I then loop through the registered variable using with_items. I've been looking at converting this to loop. I realize that

Re: [ansible-project] foo.changed vs foo|changed

2019-01-14 Thread Jason Gilfoil
red them as filters (`foo|changed`). We > are deprecating using tests as filters, which is why the `is` syntax is > preferred there. > > On Mon, Jan 14, 2019 at 10:20 AM Jason Gilfoil > wrote: > >> It's unfortunately exceedingly difficult to search for "|"

[ansible-project] foo.changed vs foo|changed

2019-01-14 Thread Jason Gilfoil
It's unfortunately exceedingly difficult to search for "|" in most search engines, so finding info about this was not fruitful. My question is, is there a difference between foo.changed and foo|changed, especially used in a "when:" parameter? If there's no difference, what's the preferred synta

[ansible-project] Re: Looping over nested inventory items with conditional

2018-02-14 Thread Jason Gilfoil
Thanks! that got me what I needed. I made this slight modification to the item piece and i'm good to go! msg: "{{ hostvars[item].ansible_host }}" On Tuesday, February 13, 2018 at 5:30:55 PM UTC-5, flowerysong wrote: > > On Tuesday, February 13, 2018 at 4:02:57 PM UTC-5

[ansible-project] Looping over nested inventory items with conditional

2018-02-13 Thread Jason Gilfoil
Hey all, We're migrating from a single load balancer pair for all systems (dev/test/qa/prod) to separate pairs for dev/test and qa/prod. As a result, my previous task to pull nodes from the pool on the load balancer will no longer suffice without some conditional logic. I have a partial soluti

[ansible-project] Re: jinja help

2018-02-13 Thread Jason Gilfoil
Not sure about your second question, but as for your first, this should work. when: ansible_hostname | lower | search ("sql-db") == False No idea where I found it originally, i just dug through my own scripts for an example. On Tuesday, February 13, 2018 at 2:01:05 PM UTC-5, John Harmon wrote:

Re: [ansible-project] ansible_group_priority documentation

2017-10-10 Thread Jason Gilfoil
Got it, thanks guys! On Monday, October 9, 2017 at 12:59:57 PM UTC-4, Kai Stian Olstad wrote: > > On 08. okt. 2017 20:35, Jason Gilfoil wrote: > > The release notes for 2.4 mention a new ansible_group_priority variable. > I > > can't seem to find this in the docs anyw

[ansible-project] ansible_group_priority documentation

2017-10-08 Thread Jason Gilfoil
The release notes for 2.4 mention a new ansible_group_priority variable. I can't seem to find this in the docs anywhere. Am I just missing it? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving

[ansible-project] Re: update to ansible appears to have broken required functionality - setup delegate_facts

2017-04-17 Thread Jason Gilfoil
nvm, found a bug report on this issue here: https://github.com/ansible/ansible/issues/20980 I'll update that ticket with my feedback. On Monday, April 17, 2017 at 12:54:22 PM UTC-4, Jason Gilfoil wrote: > > Did you find a solution to this? I'm having the same issue on the

[ansible-project] Re: update to ansible appears to have broken required functionality - setup delegate_facts

2017-04-17 Thread Jason Gilfoil
Did you find a solution to this? I'm having the same issue on the same version, ansible 2.2.1.0. https://pastebin.com/a2gPLwWm On Monday, February 6, 2017 at 9:41:41 AM UTC-5, Peter Heitman wrote: > > I am running ansible on CentOS 6.8. This morning I ran yum update and got > updated to a new

Re: [ansible-project] Shell Module and escaping quotes

2016-07-28 Thread Jason Gilfoil
Awesome! That worked :) Thanks so much for your help. On Thursday, July 28, 2016 at 2:43:02 AM UTC-4, Kai Stian Olstad wrote: > > On 28. juli 2016 00:42, Jason Gilfoil wrote: > > I ran with the idea of grabbing the last log line in a separate task and > > using a when condi

Re: [ansible-project] Shell Module and escaping quotes

2016-07-27 Thread Jason Gilfoil
tps://groups.google.com/forum/#!msg/ansible-project/mLgdORSFspo/PXfO76QNfMMJ but i'm not sure where I would apply the raw syntax in there or if it even applies. On Wednesday, July 27, 2016 at 10:26:24 AM UTC-4, Kai Stian Olstad wrote: > > On 26. juli 2016 23:09, Jason Gilfoil wrote:

[ansible-project] Shell Module and escaping quotes

2016-07-26 Thread Jason Gilfoil
I apologize if this isn't an strictly an ansible problem, but I'm attempting to run a command like the following which works when run directly on the server in bash but fails when I try running via ansible. - name: write commit to history shell: "[[ $(tail -1 /app/psoft/install_logs/deplo

[ansible-project] Re: Serial: usage across multiple plays

2016-06-14 Thread Jason Gilfoil
lculated correctly when the host number is below 1. To be corrected in a coming version release. On Tuesday, June 14, 2016 at 8:34:23 AM UTC-4, Jason Gilfoil wrote: > > After working on it some more, I realized that I can't easily just call my > roles in the rolling-update.yml

[ansible-project] Re: Lineinfile append at EOF

2016-06-14 Thread Jason Gilfoil
Mona, I don't think you need the regexp parameter, just set 'insertafter: EOF' to get it to append at the end of the file. See for what works for me in one of my scripts: - name: add script exec to bashrc lineinfile: dest: /home/.bashrc state: present line: '. /home/.profile-custom

[ansible-project] Re: Serial: usage across multiple plays

2016-06-14 Thread Jason Gilfoil
erial execution. The only way I can see forward here is to tag the roles and use --skip-tags: when calling the playbook and exclude the roles which don't need to be applied everywhere. Feels kinda like a hacky way to accomplish it though. On Monday, June 13, 2016 at 4:07:04 PM UTC-4, Jason Gil

[ansible-project] Serial: usage across multiple plays

2016-06-13 Thread Jason Gilfoil
I'm trying to write a rolling-update.yml playbook that calls other playbooks and makes use of the serial: attribute. It goes something like this: rolling-update.yml: - hosts: nonprod-app-servers > serial: "30%" > pre_tasks: > - name: disable node in the F5 Pool > - include: peoplesoft.yml

Re: [ansible-project] Using an inventory group with_Items in playbook and in template

2016-04-17 Thread Jason Gilfoil
Fantastic timing on this question! I was just about to post the same thing. Also, since it wasn't initially clear for me, i'll post for the benefit others: You can use it this way: * - debug: msg="{{ hostvars[item].ansible_host }}"* * with_items: groups.f5loadbalancers* On Sunday, April

[ansible-project] Re: using register stdout_lines in with_items loop

2016-02-23 Thread Jason Gilfoil
you can't seem to use the 'rc' property of the register variable in a task because the rc code only exists if the task fails. I'm thinking there must be a way to say fail_when: the register.rc exists, but haven't figured that part out yet. On Monday, February 22, 2016 at

[ansible-project] using register stdout_lines in with_items loop

2016-02-22 Thread Jason Gilfoil
Hello All, I'm ultimately attempting to pull a list of files with wildcarded paths and pass the results into the replace module so it can cycle through them all. However, starting with a more simple example, i'm having issues getting the list of files to print properly in even a simple test cas

Re: [ansible-project] F5 bigip_pool_member Module bigsuds not found

2016-01-22 Thread Jason Gilfoil
s that `bigip_pool_member` > is executing on the ansible control machine, not the F5. As such you will > need to install bigsuds on the ansible control machine. > > On Fri, Jan 22, 2016 at 11:20 AM, Jason Gilfoil > wrote: > >> Hello Ansible Community, >> >> Wondering if any

[ansible-project] F5 bigip_pool_member Module bigsuds not found

2016-01-22 Thread Jason Gilfoil
Hello Ansible Community, Wondering if anyone familiar with this module could lend a hand. I'm attempting to use the bigip_pool_member module to force a node offline in an F5 LTM pool. However i'm getting the error "the python bigsuds module is required". I've verified that bigsuds is installed

[ansible-project] Re: fail_when error

2015-10-29 Thread Jason Gilfoil
Thanks for the response, and sorry for the confusion, I was trying to use simpler examples to explain the problem, but seemed to have failed. I'm trying to use the replace module to update a bunch of weblogic files with the correct version after a new version of java has been deployed. However

[ansible-project] Re: fail_when error

2015-10-27 Thread Jason Gilfoil
, October 27, 2015 at 11:55:21 AM UTC-4, Jason Gilfoil wrote: > > So i'm really stumped about this failed_when clause that keeps giving me > errors. > > I was trying to use a failed_when syntax like the below which is very > similar to other failed_when conditionals that i&#x

[ansible-project] fail_when error

2015-10-27 Thread Jason Gilfoil
So i'm really stumped about this failed_when clause that keeps giving me errors. I was trying to use a failed_when syntax like the below which is very similar to other failed_when conditionals that i've used previously. failed_when: result.rc != 0 and result.rc != 257 However this keeps giving

[ansible-project] Re: Is there a way to specify a password for the SSH session in config file or CLI

2015-10-25 Thread Jason Gilfoil
use: > > - hosts: '{{ newpi }}' > > in the playbook.yml > > Is there a way that makes passing the *newpi* unnecessary? > > On Monday, October 26, 2015 at 2:04:06 AM UTC+9, Jason Gilfoil wrote: >> >> My mistake. I thought i'd used it previously in a

[ansible-project] Re: changed_when: NumberA > NumberB

2015-10-25 Thread Jason Gilfoil
I found the answer. By putting | int }} next to the variable, it converts to an integer and compares properly. -- 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

[ansible-project] Re: changed_when: NumberA > NumberB

2015-10-25 Thread Jason Gilfoil
/ansible/issues/8498 On Sunday, October 25, 2015 at 3:27:29 AM UTC-4, Jason Gilfoil wrote: > > > I'm attempting to compare version numbers of a app by extracting the > current version from the output of a shell command and comparing it to the > version to be deployed. How

[ansible-project] Re: Is there a way to specify a password for the SSH session in config file or CLI

2015-10-25 Thread Jason Gilfoil
hardcode password 'raspberry" (in ansible.cfg, as a command-line >parameter or elsewhere, but not in the inventory file which I do not > intend >to use) > > > On Sunday, October 25, 2015 at 3:48:37 PM UTC+9, Jason Gilfoil wrote: >> >> You can just u

[ansible-project] changed_when: NumberA > NumberB

2015-10-25 Thread Jason Gilfoil
I'm attempting to compare version numbers of a app by extracting the current version from the output of a shell command and comparing it to the version to be deployed. However the result of the changed_when: evaluation is always true, regardless of the numbers I put in. I've confirmed the numb

[ansible-project] Re: Is there a way to specify a password for the SSH session in config file or CLI

2015-10-24 Thread Jason Gilfoil
You can just use the ansible_ssh_pass parameter: - name: some task shell: "echo 'hello world'" ansible_ssh_pass: raspberry http://docs.ansible.com/ansible/intro_inventory.html#list-of-behavioral-inventory-parameters On Sunday, October 25, 2015 at 12:45:23 AM UTC-4, techraf wrote: > > Is it p

Re: [ansible-project] Idempontent maintenance of a cfg file

2015-10-02 Thread Jason Gilfoil
Ahh ok, I see. I didn't realize templates did comparisons before copying. Thanks for your help! On Friday, October 2, 2015 at 7:43:07 PM UTC-4, Brian Coca wrote: > > template would not force unnecessary changes, it is your best bet for > idempotency. > > -- > Brian Coca > -- You received th

[ansible-project] Idempontent maintenance of a cfg file

2015-10-02 Thread Jason Gilfoil
Hi All, I'm learning Ansible and am preparing to try and execute both deployment and configuration maintenance on a few systems at work. One configuration file in particular is giving me issues however. I want to be able to update Min and Max Instances in this section of a cfg file: ... [PSAPP