[ansible-project] Simple Playbook for mysql query

2021-09-17 Thread Adam
Hello, I have been using Ansible for very basic playbooks. I now want to have a simply playbook that connected to my asterisk PBX, and lookup a value in the my SQL table. I have tried many various combinations to get this working, but keep getting errors. Can someone help with this simply p

[ansible-project] Re: Simple Playbook for mysql query

2021-09-17 Thread Adam
Sure! ERROR! couldn't resolve module/action 'community.mysql.mysql_query'. This often indicates a misspelling, missing collection, or incorrect module path. The error appears to be in '/etc/ansible/playbooks/get_trunk_name.yml': line 8, column 5, but may be elsewhere in the file depending on th

[ansible-project] Re: Simple Playbook for mysql query

2021-09-17 Thread Adam
ansible 2.9.25 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/intulseadmin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.6/site-packages/ansible executable location = /usr/bin/ansible py

[ansible-project] Re: Simple Playbook for mysql query

2021-09-17 Thread Adam
I confirmed that it was already installed by running that command again. It's installed, and I just specified the login host, user, password, etc. On Friday, September 17, 2021 at 4:57:49 PM UTC-4 rjr...@gmail.com wrote: > I think the module may be not installed yet. According to: > > > https:

[ansible-project] Re: Simple Playbook for mysql query

2021-09-18 Thread Adam
SO this is what happens when I check if the module exists when logged in as a normal user: [WARNING]: module community.mysql.mysql_query not found in: /home/normaluser/.ansible/plugins/modules:/usr/share/ansible/plugins/modules:/usr/lib/python3.6/site- packages/ansible/modules If I run that sam

Re: [ansible-project] Re: Simple Playbook for mysql query

2021-09-18 Thread Adam
ding line appears to be: - name: get trunk names ^ here On Saturday, September 18, 2021 at 8:45:29 AM UTC-4 rajthecomputerguy wrote: > Have you checked the syntax check? > > On Sat, Sep 18, 2021, 5:58 PM Adam wrote: > >> SO this is what happens when I check if the module

Re: [ansible-project] Simple Playbook for mysql query

2021-09-18 Thread Adam
^ here On Saturday, September 18, 2021 at 10:13:22 AM UTC-4 wne...@gmail.com wrote: > Hi, > > > > On 18.09.2021, at 14:28, Adam wrote: > > > > SO this is what happens when I check if the module exists when logged in > as a normal user: > > > >

Re: [ansible-project] Simple Playbook for mysql query

2021-09-18 Thread Adam
t.org wrote: > On Sat, 18 Sep 2021 at 19:03, Adam wrote: > >> OK, thank you. I think I am getting closer. I installed as the normal >> user. Now I am just getting another error. This is the file: >> >> --- >> - name: Select trunk name from pbx >> hosts

Re: [ansible-project] Simple Playbook for mysql query

2021-09-18 Thread Adam
t; Hello Adam, > 1 - I think the module isn't loaded on the control node. I think you need > to do load it locally because its complaining it cannot find the module. > > 2 - Ensure you have a mysql connector on the control node (most common is > PyMySQL) > > In summar

[ansible-project] Re: Simple Playbook for mysql query

2021-09-18 Thread Adam
Thank you for the explanation Flowerysong. As a followup, to learn how to do some proper formatting, I would like to format my output and export it to a file. For example, I successfully get the following output below.In an ideal world, I could filter this output and put it into a file. I

[ansible-project] Re: Simple Playbook for mysql query

2021-09-19 Thread Adam
That will work perfect. Thank you! On Saturday, September 18, 2021 at 5:43:53 PM UTC-4 stefim...@gmail.com wrote: > export ANSIBLE_STDOUT_CALLBACK=debug > or you put it in ansible.cfg in your project folder. > (check current value with ansible-config dump | grep -i stdout_callba) > Cheers ! > L

[ansible-project] Remove CRON entry not created with Ansible

2021-11-12 Thread Adam
Via Ansible, is there any way to remove a CRON job entry that was not created by Ansible? For example, I have the entry below, but as you can see, it does not have the #Ansible above it, so it does not have a "name" parameter to remove. 4 3 * * * /sbin/shutdown -r now >/dev/null 2>&1 -- You

[ansible-project] How much time do you invest in tagging?

2019-12-05 Thread Adam
another. Does anyone have any strategies for overcoming this? Just curious how other people are using them. Thanks, Adam -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails f

[ansible-project] Re: Testing Authentication with Ansible

2019-12-05 Thread Adam
We've been experimenting using Selenium for things like this. It's not simple and will probably make your head hurt (it makes mine hurt), but it is very flexible for things like this. On Wednesday, December 4, 2019 at 3:16:13 PM UTC-5, Cade Lambert wrote: > > We have a CMS web application that

[ansible-project] AWS elastic load balancer rules

2019-04-23 Thread Adam
working on adding this feature? Thanks in advance, Adam -- 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.

[ansible-project] Is there a way to get the OS from AWS?

2019-05-22 Thread Adam
Hi all - I'm trying to gather facts from an ec2 instance. Specially, the operating system release (i.e. /etc/redhat-release). I can gather the info from local VMs, but Ansible doesn't seem to return the OS when I gather facts from an EC2 instance. I tried the ec2_instance_facts module (htt

Re: [ansible-project] Is there a way to get the OS from AWS?

2019-05-22 Thread Adam
s the hosts, and need reliable info, then go > that route I'd say. > Also, *IF* you go this route, I'd suggest to not manually parse > /etc/redhat-release to determine release/distros/versions, but use the > existing ansible logic from the setup module. > > Dick >

Re: [ansible-project] Is there a way to get the OS from AWS?

2019-05-22 Thread Adam
ne ec2 instance detail or multiple? > > > On Wed, May 22, 2019 at 6:26 PM Adam > > wrote: > >> Hi all - >> >> I'm trying to gather facts from an ec2 instance. Specially, the >> operating system release (i.e. /etc/redhat-release). I can gather the i

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

2019-05-29 Thread Adam
oBuild - name: debug directory output debug: msg: "{{directoriesToBuild.results|map(attribute='stdout_lines')|list}}" - name: build found directories file: state: directory path: "{{item}}" with_items: - "{{directoriesToBuild.results|map(at

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

2019-05-29 Thread Adam
I was over zealous & too hopeful.. this doesn't actually work for me. It looks like it treats the whole list of directories as one big directory. I'm not entirely sure why yet. On Wednesday, May 29, 2019 at 9:12:22 PM UTC-4, Adam wrote: > > Matt - > > I don't

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

2019-05-30 Thread Adam
}}" with_items: - "{{directoriesToBuild.stdout_lines}}" On Wednesday, May 29, 2019 at 9:27:43 PM UTC-4, Adam wrote: > > I was over zealous & too hopeful.. this doesn't actually work for me. It > looks like it treats the whole list of directories as one big

[ansible-project] Using results from a loop

2019-06-19 Thread Adam
Hi - I'm trying to use the results from the find module while also using with_items. I can't figure out how to extract just the paths from the first task to be able to use as input for the second task. Has anyone else done this? Can you clue me into the magic of how to do it? Thanks in adva

Re: [ansible-project] Using results from a loop

2019-06-20 Thread Adam
": false, "follow": false, "hidden": false, "size": null } }, "matched": 14, "_ansible_ignore_errors": null, "_ansible_item_label": { "plainso

[ansible-project] Executing nested tags

2019-07-22 Thread Adam
Does anyone know of a way to execute only nested tags? For example, I use the same tag "cron" in multiple roles, but if I want to only execute the tasks tagged with "cron" under the "app1" role. Is there a syntax to make that work? Thanks, Adam -- You receive

[ansible-project] Re: How to use ec2.py with group_vars etc?

2019-07-22 Thread Adam
_access_key: "{{ ec2_server_access_key }}" aws_secret_key: "{{ ec2_server_secret_key }}" region: "{{ item.ec2_server_region }}" filters: # "tag:Name": "{{item.ec2_server_name}}" "tag:class": "{{item.class}}" &quo

[ansible-project] Task vars + Jinja template

2019-07-24 Thread Adam
Hi - I'm trying to evaluate the length of "foundQueuesCount" below in a Jinja template and use a conditional. Everything works perfectly except for when the length is zero. The task: - name: build routerconfig template: src: templates/{{item.version}}/routerconfig.j2 dest: "{{smq

Re: [ansible-project] Executing nested tags

2019-07-24 Thread Adam
; > On Mon, Jul 22, 2019 at 11:23 AM Adam > > wrote: > >> Does anyone know of a way to execute only nested tags? For example, I >> use the same tag "cron" in multiple roles, but if I want to only execute >> the tasks tagged with "cron" under th

Re: [ansible-project] Task vars + Jinja template

2019-07-24 Thread Adam
gt; > Try casting it explicitly to int? > > On Wed, 24 Jul 2019 at 15:14, Adam > wrote: > >> Hi - >> >> I'm trying to evaluate the length of "foundQueuesCount" below in a Jinja >> template and use a conditional. Everything works perfectl

Re: [ansible-project] Task vars + Jinja template

2019-07-24 Thread Adam
I just added debug to the variable: and got this: Are all variables passed to by Ansible to Jinja as text? If so, I guess I need to cast them to their proper type within the Jinja template? On Wednesday, July 24, 2019 at 9:40:54 AM UTC-4, Adam wrote: > > Hi Dick - > >

Re: [ansible-project] Task vars + Jinja template

2019-07-24 Thread Adam
I guess that's it. I have to cast the variable to the desired type in the Jinja template. I changed it to this & it works: {% if foundQueuesCount|int > 0 %} Thanks, Dick! On Wednesday, July 24, 2019 at 9:48:24 AM UTC-4, Adam wrote: > > I just added debug to the variable:

[ansible-project] ansible find with_items register results

2019-07-31 Thread Adam
I'm documenting this here for posterity because I've been struggling with a solution off & on for months. Of course, the solution was staring me in the face the whole time, but I couldn't see it. When using with_items/loop with one task, and then looping over the results in a second task, the

[ansible-project] Cronjobs

2018-03-09 Thread Adam
Hi - I've got a task to manage cronjobs on systems that works perfectly fine unless I have the following as the job: find /iqstage01/archive/* /iqstage01/error/* -type f -exec gzip {} \; Ansible doesn't like the escape on the semi-colon. Does anyone have any ideas why? Thanks, Ada

[ansible-project] Re: Cronjobs

2018-03-13 Thread Adam
For what it's worth, just escape the escape & this works: find /iqstage01/archive/* /iqstage01/error/* -type f -exec gzip {} \\; On Friday, March 9, 2018 at 2:08:33 PM UTC-5, Adam wrote: > > Hi - > > I've got a task to manage cronjobs on systems that works perfectly

[ansible-project] Re: How can I set a default that includes information from a variable?

2017-09-06 Thread Adam
I probably should have explained that "version_regex" is a variable defined in roles/role/vars/main.yml. -Adam On Wednesday, September 6, 2017 at 7:56:20 PM UTC-4, Adam wrote: > > David - > > I haven't tried doing exactly what you're trying to do, but I did &g

[ansible-project] Timeline to automate 1k+ servers

2017-09-08 Thread Adam
imal political non-sense? Less? More? Should I be padding more? Thanks, Adam -- 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+unsubs

[ansible-project] Re: ansible now supports su as an alternative to sudo

2014-01-23 Thread adam
This doesn't work with the git module. If I use sudo:true and sudo_user: {{item.owner}, then the git module does the correct thing. However, If I do su:true and su_user: {{item.owner}}, then the git module continues to run as root(I am connecting remotely as root for my playbook). I haven't t

Re: [ansible-project] git module now has sshopts and keyfile parameters

2014-01-23 Thread adam
The accept_hostkey fails if $HOME/.ssh doesn't already exist. -- 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

[ansible-project] Question: how to Use name of shell script as value to variable and execute it

2020-05-29 Thread Adam Memon
Hi All, I have a requirement to login to multiple application servers and just run different scripts individually on different servers Rather than creating task for each server - I would like to just create one task with name of the shell script in a variable How can we implement this Eg : ===

[ansible-project] With_items /pass var - string.

2020-06-02 Thread Adam McGill
I would like to take the value of the var and pass it into with_items and I am running into an issue / error, how can i pass just the value into with_items. If i hardcode and put the value with_items: {{ small2019 }} in there are no issues. Using include_vars / file which has the data, want to

Re: [ansible-project] With_items /pass var - string.

2020-06-02 Thread Adam McGill
variable. The error was: 'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'InstallMedia'\n\nThe error appears to be in On Tuesday, June 2, 2020 at 2:06:39 PM UTC-5, Stefan Hornburg (Racke) wrote: > > On 6/2/20 5:55 PM, Adam McGill wrote: > > I would like to take the value o

Re: [ansible-project] With_items /pass var - string.

2020-06-02 Thread Adam McGill
l Hard Disks\\DC2019.vhdx" Destination: "C:\\ISOs\\MDT\\DC2019\\" large2019: - config: "DC2019" InstallMedia: Source: "someshare\\" SourceVHDX: "Virtual Hard Disks\\DC2019.vhdx" Destination: "C:\\ISOs\\MDT\\DC2019\\"

Re: [ansible-project] With_items /pass var - string.

2020-06-05 Thread Adam McGill
}} }} ? Going to test out / restructure this afternoon , sorry for the delay in response, appreciate the feedback. Adam On Wednesday, June 3, 2020 at 8:09:43 AM UTC-5, Dick Visser wrote: > > All the looping constructs (with_items etc) assume you have some data > structure that is iterab

[ansible-project] Azure - Creating new / Gen2

2020-06-05 Thread Adam McGill
What azure module can i use to set the vm generation when creating a new vm? Figured it would be under azure_rm_virtualmachine. Would like to make sure it will be created with gen 2. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsub

[ansible-project] Combine dictionaries based on a dictionary key value.

2020-06-29 Thread Adam McGill
Hello, Basically want to add the items of net_interface into aggregate_info or create new dictionary based on key value of node_name. Looking for assistance on how i can achieve this please and thank you. *Dictionary called: aggregate_info* { "name": "agg_Data1_Cluster01", "node_name": "TE

[ansible-project] List/Dictionary - Combine elements based on item value

2020-06-29 Thread Adam McGill
Hello, Basically want to add the items of net_interface into aggregate_info or create new list/dictionary based on key value of node_name. Looking for assistance on how i can achieve this please and thank you. Outcome of what want it listed below. *list called: aggregate_info* { "name": "agg_

[ansible-project] Re: List/Dictionary - Combine elements based on item value

2020-06-29 Thread Adam McGill
Adding further to above, i know i can get the value i want by doing this. - debug: msg: "{% for address in net_interface if address.node_name == 'IQ-REG_NA_CLUSTER_01-01' %}{{ address.address }}{% endfor %}" Anyway to add that logic when creating the aggregate_info list. for example, bu

[ansible-project] Re: List/Dictionary - Combine elements based on item value

2020-06-29 Thread Adam McGill
Figured out how to merge the lists based on values in each list. - name: merge lists set_fact: merged_list: "{{ merged_list|default([]) + [{ 'name': item[0].name, 'size_available': item[0].size_available, 'size_avaliable_80': item[0].size_avaliable_8

[ansible-project] Conditionals using Ansible_facts.disks from the win_disk_facts

2020-07-06 Thread Adam Dyson
Hello world! Hopefully a relatively simple one, I am attempting to add a when condition on a task that will only happen if a certain disk exists on the machine. I want the following task to only take place if Ansible facts finds a disk with the number 4. however I am struggling to find the righ

[ansible-project] Re: who is using ansible for windows

2020-11-03 Thread Adam Moore
ntlm is a bad thing, kerberos across several forests, also windows behind Linux jump hosts we use SOCKS5/psrp to connect. On Tuesday, 3 November 2020 at 20:08:05 UTC vel...@gmail.com wrote: > are you using ansible to manage domain joined Windows servers? > If so, what authentication protocol ar

[ansible-project] Ansible - VPN connection to Azure

2021-03-04 Thread Adam Nowak
and could help me ? Adam -- 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] Ansible GCP Zone

2022-03-03 Thread Adam Barnett
is super slow as it does one ssh connection for each part of the playbook, a normal playbook before would take 33 seconds now it take 590 second Any suggestion? Thanks Adam -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To u

[ansible-project] Using wsman in a proxy environment

2022-06-08 Thread Adam Barnett
Hi All, we are running ansible on our network and have just deployed a proxy as we needed to cut off direct internet access. when trying to run a playbook that calls wsman i get this error ``` fatal: [10.22.0.109]: UNREACHABLE! => {"changed": false, "msg": "credssp: HTTPSConnectionPool(host=

Re: [ansible-project] Using wsman in a proxy environment

2022-06-08 Thread Adam Barnett
network as the end machine. I mentioned internet being cut off as the errror mentioned a proxy Anything else you need Thanks Adam Sent from my iPhone > On 8 Jun 2022, at 19:23, Antony Stone > wrote: > > On Wednesday 08 June 2022 at 19:16:42, Adam Barnett wrote: > >>

[ansible-project] Encrypting credentials within the vmware inventory file

2022-10-05 Thread Adam Kosseck
the encrypted password value to plaintext it works. If I encrypt the entire file it works. Can anyone see anything that I am doing wrong? Thank you! Adam -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from

[ansible-project] Issue with redhat_subscription module

2020-01-13 Thread Adam Morris
I suspect that nobody else has run across this particular issue yet. The redhat_subscription module has an error in it. If you are using pool_ids then you can either provide a list of ids, or a list of ids with quantities. Behind the scenes the module translates the former into the latter wi

[ansible-project] Hosts File - Get group name , only one item from group based on lookup

2020-04-11 Thread Adam McGill
Is it possible to specify in a playbook hosts value to be a group item from hosts file? *example:* Hosts file contains: [groupone] comname1 comname2 comname3 in the playbook would like it to grab the group (groupone) but only apply the playbook routine to a name/value in that group and not a

[ansible-project] Re: Hosts File - Get group name , only one item from group based on lookup

2020-04-12 Thread Adam McGill
into a syntax issue it seems or there isn't a way to do it. Online documentation referencing a lot with referencing groups to combine or exclude. Which isn't what i want, as i just want to reference a name/value in a group. On Sunday, April 12, 2020 at 1:04:42 AM UTC-5, Adam McGill

[ansible-project] Re: Hosts File - Get group name , only one item from group based on lookup

2020-04-12 Thread Adam McGill
I took the route of using children groups. Too bad there wasn't a way to pull a group and pick a value in that group passing to the Hosts: value in a playbook. Thanks for the assist/suggestions Stefan. On Sunday, April 12, 2020 at 1:04:42 AM UTC-5, Adam McGill wrote: > > >

[ansible-project] Include Vars / With_items / returned data options

2020-05-07 Thread Adam McGill
I am using a include_vars file to pipe the variable to a libary/ps1/py file which will return results / verification. Is there a way to not include the item data /ansible loop information in the .results data. As I figured the .results data should only include the data I pipe back from the l

[ansible-project] Include Vars, with_items , returned data with .results values

2020-05-07 Thread Adam McGill
I am using a include_vars file to pipe the variable to a libary/ps1/py file which will return results / verification. Is there a way to not include the item data /ansible loop information in the .results data. As I figured the .results data should only include the data I pipe back from the li

[ansible-project] There appears to be both 'k=v' shorthand syntax and YAML in this task.

2020-05-16 Thread Adam Morris
There also appears to be some issues with the indentation, although that could be an artifact of mail. The tasks look like they are in k=v syntax, but if the following -name is indented it could be considered part of the same task. -- You received this message because you are subscribed to th

[ansible-project] skip_unreachable ?

2019-01-15 Thread Adam E
Hi there. My scenario is that I have a hundreds of locations on various different networks that I want to run some plays against. In almost all circumstances I will have 2-3% of these sites that I cannot connect to due to network related issues.I don't want to create exceptions/errors in

Re: [ansible-project] skip_unreachable ?

2019-01-16 Thread Adam E
thanks for the reply Brian. Yes, it sounds like clear_host_errors i think will be too big of a hammer, I just want to ignore unreachable. I'll have to figure something else out then, have a couple other scenarios in mind anyways, gonna also look at something like https://github.com/openstack

[ansible-project] Options for filtering hosts

2019-01-23 Thread Adam E
If you happen to be using awx, you can enable fact caching and then create a dynamic inventory which can be based on search results including facts values -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and sto

[ansible-project] Re: need ansible to wait for a springboot acutuator heathcheck to show up

2019-01-25 Thread Adam E
something like this should work - name: "wait for status" shell: bash -c 'curl -s http://{{ server_name }}: *8093/service/actuator/health* |egrep "^status"' register: cmd_res retries: "60" delay: 1 until: cmd_res.stdout.find('"status": "UP") != -1 On Friday, January 25, 2019 at 5:25:16

[ansible-project] merging specific group_vars without changing global behavior

2019-01-29 Thread Adam E
In my environment i have a group_vars structure something like the following: [global:children] datacenter1 [datacenter1:children] network_zone1 network_zone2 [network_zone1] server1 [network_zone2] server2 so using a simple case where I want to add entries to /etc/hosts (although there a

Re: [ansible-project] Dropping Fedora rpms from https://releases.ansible.com/

2019-02-22 Thread Adam Miller
On Mon, Feb 18, 2019 at 7:45 PM Toshio Kuratomi wrote: > > Hey all, > > Recently we had a discussion internally about whether to build > upstream Ansible rpms on Fedora 29 using Python3 or Python2. This > lead to a question about how useful the Fedora rpms Ansible releases > on https://releases.a

Re: [ansible-project] skip_unreachable ?

2019-02-27 Thread Adam E
hi Brian, I was wondering if there is anything else you can suggest to me. I want to report a successful ansible run when the only thing that failed were unreachable hosts so that it returns success back to AWX. Is there a callback plugin or some local customization that I can write in th

Re: [ansible-project] skip_unreachable ?

2019-02-27 Thread Adam E
t;unreachable test" hosts: "*:!unreachable_hosts" become: no tasks: - name: "success1" copy: content: "my stuff" dest: /tmp/file.success1 On Wednesday, February 27, 2019 at 2:41:31 PM UTC-8, Adam E wrote: > > hi Brian, I was wo

[ansible-project] Re: Importing user variables from multiple variable sources

2019-03-02 Thread Adam E
I have a similar issue and solved it by this PR https://github.com/ansible/ansible/pull/51466 . if you want to use it, just grab the source code and add it to your local library directory until it's merged. Also see this thread https://groups.google.com/forum/?utm_medium=email&utm_source=foote

[ansible-project] rpm-python centos5 package package_facts

2019-03-08 Thread Adam E
hey there, i'm trying to manage a bunch of centos5/rhel5 systems with ansible 2.7.5 On the target host I am able to install python 2.6 from epel which is all good and ansible runs just fine for most stuff. The issue is with anything related to packages (ie . package_facts and package). They

Re: [ansible-project] rpm-python centos5 package package_facts

2019-03-08 Thread Adam E
; python interpreter. > > On Fri, Mar 8, 2019 at 2:25 PM Adam E > > wrote: > > > > hey there, i'm trying to manage a bunch of centos5/rhel5 systems with > ansible 2.7.5 > > > > On the target host I am able to install python 2.6 from epel which is &

Re: [ansible-project] rpm-python centos5 package package_facts

2019-03-08 Thread Adam E
manage them by setting the inventory variable >> "ansible_python_interpreter" for them to the path of the alternate >> python interpreter. >> >> On Fri, Mar 8, 2019 at 2:25 PM Adam E > >> wrote: >> > >> > hey there, i'm trying to man

Re: [ansible-project] Re: getting a variable indirectly

2019-03-14 Thread Adam E
i'm not sure if it would work on that old version, but couldn't you just copy the vars plugin file into your local "lookup_plugins" directory? On Tuesday, March 12, 2019 at 6:41:12 AM UTC-7, fusillator wrote: >

Re: [ansible-project] Re: Importing user variables from multiple variable sources

2019-03-21 Thread Adam E
t; so far so good. Certainly not as elegant as Puppet/Hiera but it's a > working solution. > > Regards, > Suhail. > > On Thu, 21 Mar 2019 at 18:49, Kai Stian Olstad > > wrote: > > > > On 21.03.2019 12:58, Suhail Choudhury wrote: > > > T

[ansible-project] list containing any item of another list

2019-04-03 Thread Adam E
Hi, wondering if there is any cleaner way to see if two lists have 1 or more intersecting values? the following works for me # returns true > {{ ['value1', 'value2'] | intersect(['value1', 'value2']) | length > 0 }} > # returns false > {{ ['value3', 'value4'] | intersect(['value1', 'value2']) |

[ansible-project] Re: Run custom code before first task in playbook

2019-04-16 Thread Adam E
I do something similar, I just use the assert module to check a fact that I know should be set to a predefined value. - name: "linux : global assertions" assert: that: - "group_ld_all_000_global_defaults == 'loaded'" fail_msg: 'environment issue, please double check, thi

[ansible-project] Re: How to mask connection string Passwords while connecting through DB using sqlplus ansible

2019-04-30 Thread Adam E
you could also look at using oracle wallet if you don't want to use environment variables for some reason. https://docs.oracle.com/cd/B19306_01/network.102/b14266/cnctslsh.htm#g1033548 On Monday, April 29, 2019 at 4:04:37 PM UTC-7, Raj wrote: > > I am running into an issue where ansible is spitt

[ansible-project] Re: Ansible how to subtract two variables in a playbook?

2019-04-30 Thread Adam E
You could run a "shell" command and register the output to a variable using a command something like the following: echo $((($(date +%s) - $(date +%s -r "$filename")) / 86400)) Alternatively, you could develop a action_plugin that c

Re: [ansible-project] Re: Ansible how to subtract two variables in a playbook?

2019-04-30 Thread Adam E
ur saying I can echo > with the shell module what is the -r any way ? > > > > On Tue, Apr 30, 2019 at 12:42 PM Adam E > > wrote: > >> You could run a "shell" command and register the output to a variable >> using a command something like the foll

[ansible-project] multiline jinja2 lists returned as string?

2019-05-03 Thread Adam E
Hi there, I have some logic that I want to apply when creating assigning a list to a variable. See my sample playbook below, Ideally i'd like a nice clean way to have a logic based list. the "users" approach works, however it's always interpreted as a string. The only solution I can think of t

Re: [ansible-project] multiline jinja2 lists returned as string?

2019-05-08 Thread Adam E
ements and the crux of what I was after was how to nicely do complex multiline jinja statements that use lists. On Wednesday, May 8, 2019 at 1:11:43 PM UTC-7, Kai Stian Olstad wrote: > > On 03.05.2019 22:15, Adam E wrote: > > Hi there, I have some logic that I want to apply when c

Re: [ansible-project] multiline jinja2 lists returned as string?

2019-05-08 Thread Adam E
dd a minus > sign (-) to the start or end of a block (e.g. a For tag), a comment, or a > variable expression, the whitespaces before or after that block will be > removed > > On Wed, May 8, 2019 at 3:43 PM Adam E > > wrote: > >> thanks for the reply, I had also thought

Re: [ansible-project] $PATH with shell is different to manual ssh

2019-05-09 Thread Adam E
I deal with a lot of legacy systems that don't always have great path defaults for working with Ansible. I ended up putting the following at the top of my main playbook to add some common locations to the path if they were not present. Might help in your case if you can't easily modify the s

[ansible-project] Re: Pass a variable in "vars_file" to "with_items" from command prompt as part of "extra-vars"

2019-05-10 Thread Adam E
Not sure if it meets your needs, but why not do something like this: - hosts: localhost > vars: > docker_configs: > tomcat: { cName: 'tomcatImg', iName: 'tomcat:latest', iPort: , > volumes: '/temp' } > nginx: { cName: 'nginxImg', iName: 'nginx:latest', iPort: 8001, > volume

[ansible-project] ansible_python_interpreter facts.d

2019-05-13 Thread Adam E
Hi there. On a few old/legacy systems I have installed python 2.6 in a nondefault location whereas the "default" (path) is an older version such as 2.4. In some cases I have legacy apps that may need the old version and I don't want to affect their environment. Setting ansible_python_interp

[ansible-project] Re: Running ansible tasks in background and disown

2019-05-15 Thread Adam E
not sure if you would get different results, but maybe try nohup instead of disown. ie. - name: execute sar iostat scripts shell: nohup top -bd $MON_INTERVAL > $GLUSTER_PROFILER_RESULTS/top_proc.$HOSTNAME.txt & Another option could be to use the "at" module to schedule a task to start immedia

[ansible-project] Failed to resolve remote temporary directory from ansible-tmp...

2019-05-23 Thread Adam Shand
HOME (it's the same on working and non-working hosts) or it might be a weird shell (it's bash on all the hosts). If anyone has any other suggestions I'd would greatly appreciate it. Cheers, Adam. -- You received this message because you are subscribed to the Google Groups

[ansible-project] Re: Multi-tenant best practices for Ansible Tower

2019-05-28 Thread Adam E
Check out https://docs.ansible.com/ansible-tower/latest/html/userguide/organizations.html to see if it meets your needs. Your post should be posted to the awx project forum https://groups.google.com/forum/#!forum/awx-project On Monday, May 27, 2019 at 10:49:19 AM UTC-7, dimple rohara wrote: >

[ansible-project] Re: Failed to resolve remote temporary directory from ansible-tmp...

2019-05-29 Thread Adam Shand
Bump, I could really use some assistance here. Can anyone help out? Thanks, Adam. On Friday, May 24, 2019 at 4:49:24 PM UTC+12, Adam Shand wrote: > > Enter code here... > > Hey, > > I submitted a bug but got told "it wasn't a bug" and to ask here. So I

[ansible-project] Re: Failed to resolve remote temporary directory from ansible-tmp...

2019-05-29 Thread Adam Shand
hursday, May 30, 2019 at 2:48:58 PM UTC+12, Adam Shand wrote: > > Bump, I could really use some assistance here. > > Can anyone help out? > > Thanks, > Adam. > > On Friday, May 24, 2019 at 4:49:24 PM UTC+12, Adam Shand wrote: >> >> Enter code here... >> &

[ansible-project] ios_facts not picking up Neighbors

2019-06-03 Thread Adam Lowery
I am running ios_facts using "gather facts: all" and i am not recieving any neighbor facts. this works with nxos_facts but not ios_facts. can anyone help? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and sto

[ansible-project] Request For Feedback: Security Operations Automation

2019-08-08 Thread Adam Miller
Hello all, This is a Request For Feedback (and potentially contributors if anyone is interested in joining the fun). I've started creating an Ansible Collection[0][1] with modules/plugins/roles/etc focused on Security Operators[2], or basically anyone working in a Security Operations Center wh

Re: [ansible-project] Is there a way to check if a service is already enabled on a linux machine?

2018-08-03 Thread Adam Miller
On Fri, Aug 3, 2018 at 7:52 AM yaakov.kuperman via Ansible Project wrote: > > Awesome! Thanks! As an option, you can also use the service_facts module to inspect service state: https://docs.ansible.com/ansible/latest/modules/service_facts_module.html#service-facts-module -AdamM > > YK > On Thu

Re: [ansible-project] Is there a way to check if a service is already enabled on a linux machine?

2018-08-03 Thread Adam Miller
7;m apparently mistaken on). -AdamM > > On Friday, August 3, 2018 at 9:24:42 AM UTC-4, Pavel Cahyna wrote: >> >> On Fri, Aug 03, 2018 at 08:14:15AM -0500, Adam Miller wrote: >> > On Fri, Aug 3, 2018 at 7:52 AM yaakov.kuperman via Ansible Project >> > wrote: >

[ansible-project] How to edit a variable in a later variable file

2017-05-22 Thread Adam Lininger
I would like to be able to edit a variable (per host) that was originally defined in a default file. The larger situation is this. We have a large number of servers with a defined set of local accounts. The list of accounts is defined something like this in the default.yml file for the role. Th

Re: [ansible-project] Add role dependency to another role without it being executed automatically

2017-07-26 Thread Adam Addamsky
On Friday, July 7, 2017 at 9:22:18 PM UTC+1, Dick Davies wrote: > Why not just stick the slack tasks in the relevant roles? > In this speci That would result in a lot of duplicated code and potential problems with maintainability. Also, that practice leads to "inventing the wheel all over agai

[ansible-project] Custom Module Output parsing

2017-08-07 Thread Adam Shantz
start-queuesize": "-1", "propertyCount": 5, "cleanup-interval": "-1", "cache-size": "5000", "persistence-mode": "non_persistent"}}, {"test": {"propertyCount": 1}} ] I've added line-breaks to mak

[ansible-project] Re: Custom Module Output parsing

2017-08-07 Thread Adam Shantz
istent'}\n{'cache-size': '5000', 'flowcontrol-start-queuesize': '-1', 'name': 'q2', 'cleanup-interval': '-1', 'persistence-mode': 'non_persistent'}\n{'cache-size': '5000', 'flowcontr

[ansible-project] Re: Custom Module Output parsing

2017-08-07 Thread Adam Shantz
On Monday, August 7, 2017 at 2:57:18 PM UTC-4, Adam Shantz wrote: > > My python code works fine to parse the output, but my module continually > fails for reasons I can't explain. Can someone give me a hint? > > *Module code:* > #!/usr/bin/python > > ANSIBLE_META

  1   2   3   4   >