[ansible-project] Ansible and SELinux Issues

2021-12-06 Thread Ryan P
and unconfined_t, Ansible works as expected. Unfortunately I'm not able to dispute with my security department as to why the sysadm context is a just a drunken version of the unconfined context, so if anyone has any suggestions I would be extremely grateful. - Ryan P -- You received

Re: [ansible-project] Playbook Variable and Jinja 2 -- Namespace Problem?

2021-10-20 Thread Ryan Caudle
I thought we were on Jinja 3? On Wed, Oct 20, 2021, 6:48 PM Clint Denham wrote: > Can you post a little of update_results? > > Sometimes with this error you just need to include the list reference. 0 > being the first list. > > update_results.0.updstes[k] > > Once we get the entire

Re: [ansible-project] Windows module error with ansible.legacy.setup PowerShell -NoProfile -NonInteractive?

2021-01-12 Thread Ryan Nix
ble that with > 'ansible_shell_type=powershell'. Right now it's using cmd hence the cmd > syntax which isn't valid in PowerShell. > > On Tuesday, January 12, 2021 at 12:53:05 PM UTC+10 ryan...@gmail.com > wrote: > >> I'm aware that using SSH with Windows is experimental. The connection

Re: [ansible-project] Windows module error with ansible.legacy.setup PowerShell -NoProfile -NonInteractive?

2021-01-12 Thread Ryan Nix
ich isn't valid in PowerShell. > > On Tuesday, January 12, 2021 at 12:53:05 PM UTC+10 ryan...@gmail.com > wrote: > >> I'm aware that using SSH with Windows is experimental. The connection >> isn't the issue, though. >> >> On Monday, January 11, 2021

Re: [ansible-project] Windows module error with ansible.legacy.setup PowerShell -NoProfile -NonInteractive?

2021-01-11 Thread Ryan Nix
ka.ms/o0ukef> > -- > *From:* ansible...@googlegroups.com on > behalf of Ryan Nix > *Sent:* Tuesday, January 12, 2021 1:46:55 PM > > *To:* Ansible Project > *Subject:* Re: [ansible-project] Windows module error with > ansible.legacy.setup PowerShell -NoProfile -NonInteractive

Re: [ansible-project] Windows module error with ansible.legacy.setup PowerShell -NoProfile -NonInteractive?

2021-01-11 Thread Ryan Nix
ka.ms/o0ukef> > -- > *From:* ansible...@googlegroups.com on > behalf of Ryan Nix > *Sent:* Tuesday, January 12, 2021 1:10:47 PM > *To:* Ansible Project > *Subject:* Re: [ansible-project] Windows module error with > ansible.legacy.setup PowerShell -NoProfile -NonIntera

Re: [ansible-project] Windows module error with ansible.legacy.setup PowerShell -NoProfile -NonInteractive?

2021-01-11 Thread Ryan Nix
shell" snippet and it's still turning up this vexing error. So you're right, it's like this Powershell example did something that is breaking subsequent runs. On Monday, January 11, 2021 at 4:49:05 PM UTC-6 Antony Stone wrote: > On Monday 11 January 2021 at 23:16:28, Ryan Nix wrote

[ansible-project] Windows module error with ansible.legacy.setup PowerShell -NoProfile -NonInteractive?

2021-01-11 Thread Ryan Nix
Hello, I had my playbook working perfectly until I made what I thought was a small change! I'm running the latest version of Ansible, version 2.10.4. Ansible keeps telling me there is a problem with line 1 but I'm having a hard time interpreting what the error means. Almost seems like VS Code

[ansible-project] Upgrade To Windows 20H2

2020-11-02 Thread Ryan Zore
Is it possible to do a full Windows Feature Update? It doesnt appear these have a KB attached to them and I dont see a way to specify GUID. Thanks in advance Ryan -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubs

Re: [ansible-project] ipaddr cidr_lookup

2020-06-15 Thread Ryan Merolle
ks: > > - debug: > msg: belongs > when: item | ipaddr('192.168.0.0/8') > loop: > - 192.168.0.45 > - 192.1.0.4/24 > - 127.0.0.1 > > > Hope that helps! > > On Mon, Jun 15, 2020 at 5:58 PM Ryan Merolle > wrote:

Re: [ansible-project] ipaddr cidr_lookup

2020-06-15 Thread Ryan Merolle
Hello Scott, Iā€™m very familiar with the documented functions of the ipaddr filter. If you look at the link you just sent cidr_lookup is not a documented function, but it is listed in the source code of the filter as I linked to in my original post. Thanks! -- You received this message

[ansible-project] ipaddr cidr_lookup

2020-06-15 Thread Ryan Merolle
Anyone use this filter function? It seems like a lookup to see if an IP or subnet is a member of a larger prefix. https://github.com/ansible-collections/ansible.netcommon/blob/master/plugins/filter/ipaddr.py#L665 I am just not sure on the proper usage. Thanks! -- You received this message

[ansible-project] How to auto detect all drive partitions and pull facts from them?

2019-10-08 Thread Ryan
If i know the system configuration, I can set set variables from the facts using: - set_fact: drive0start={{ ansible_devices.sda.partitions.sda1.start }} register: drive0start - set_fact: drive0sectors={{ ansible_devices.sda.partitions.sda1.sectors }} register: drive0sectors - debug:

Re: [ansible-project] How do I reduce the debug output to just the message with this playbook ?

2019-07-28 Thread ryan prihoda
TASK [debug] * ok: [as2] => (item={'_ansible_parsed': True, 'stderr_lines': [], u'changed': True, u'stdout': u'189G',

Re: [ansible-project] How do I reduce the debug output to just the message with this playbook ?

2019-07-27 Thread ryan prihoda
: > Yes: https://docs.ansible.com/ansible/latest/plugins/callback/default.html > > On Sat, 27 Jul 2019 at 22:19, ryan prihoda wrote: > > > > Is there a default callback? > > > > -- > > You received this message because you are subscribed to the

Re: [ansible-project] How do I reduce the debug output to just the message with this playbook ?

2019-07-27 Thread ryan prihoda
Is there a default callback? -- 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 the

[ansible-project] How do I reduce the debug output to just the message with this playbook ?

2019-07-27 Thread ryan prihoda
### catalina-inspect.yml - name: find tomcat logs size hosts: tomcat become: no tasks: - name: finding files task find: path: . file_type: directory patterns: "tomcat-*" register: find changed_when: False - name: size shell: du -h "{{ item }}/logs" |

Re: [ansible-project] Is it possible to run Ansible against a jailed environment without python?

2019-05-23 Thread Ryan Bak
Thanks, this is exactly what I needed. For anyone else interested in this answer, the relevant code is here: https://github.com/ansible/ansible-container/blob/c6b28ceb239356eb86ad42b2126812610885/container/core.py#L734 On Thursday, May 16, 2019 at 10:06:57 AM UTC-7, Brian Coca wrote: > >

[ansible-project] Is it possible to run Ansible against a jailed environment without python?

2019-05-16 Thread Ryan Bak
I have a mounted image that I'm running Ansible against. Currently I'm using an sshd jail, restricting ssh to the root of the image so that Ansible can run as if the the image is a host, but I would like to remove the restriction that the image has to have python. The host where the image is

[ansible-project] Serial failure, fail remaining hosts

2019-05-09 Thread Ryan Belgrave
I have a playbook that is using serial: 1 to perform rolling updates to 1 host at a time. Sometimes one host will fail which stops the whole play. However this seems to only fail one host, not all the remaining hosts. Is it possible to get all the remaining hosts to fail as well so I can

[ansible-project] Re: How to transfer a big size file to ansible server from a remote node?

2019-03-06 Thread Ryan
You can use "copy" but I think there is a 1G file size limit. How big a file do you need to copy? If you need to pull down a huge file, how about using http or scp to pull the file from the Ansible server? On Friday, December 2, 2016 at 9:16:42 AM UTC-8, Ray Tan wrote: > > Hi Everyboby, > >

[ansible-project] Re: lineinfile path local and remote path

2019-03-05 Thread Ryan
}}" On Monday, March 4, 2019 at 6:44:44 PM UTC-8, Ryan wrote: > > I have a playbook that uses the following: > - set_fact: logfile=/home/sandbox/playbooks/LOGS/{{ systemSN }} > > Lower in the playbook I have: > > - lineinfile: > line: "{{ item

[ansible-project] lineinfile path local and remote path

2019-03-04 Thread Ryan
I have a playbook that uses the following: - set_fact: logfile=/home/sandbox/playbooks/LOGS/{{ systemSN }} Lower in the playbook I have: - lineinfile: line: "{{ item }}" path: "{{ logfile }}" create: yes with_items: - "Serial Number: {{

Re: [ansible-project] Combine values from multiple lists

2019-03-04 Thread Ryan
This worked thanks On Thursday, February 28, 2019 at 12:11:30 PM UTC-8, Kai Stian Olstad wrote: > > On 28.02.2019 21:02, Ryan wrote: > > Sorry, the output is from stdout_lines. here is the section. > > > > - lineinfile: > > line: "

Re: [ansible-project] Combine values from multiple lists

2019-02-28 Thread Ryan
2019 at 11:10:23 AM UTC-8, Kai Stian Olstad wrote: > > On 28.02.2019 01:27, Ryan wrote: > > Thanks, that worked well. I am writing this information to a file using > > lineinfile. How would I strip off the brackets, quotes and commas? > > ['DIMM1', 'G5-111', '9990001

Re: [ansible-project] Combine values from multiple lists

2019-02-27 Thread Ryan
Thanks, that worked well. I am writing this information to a file using lineinfile. How would I strip off the brackets, quotes and commas? ['DIMM1', 'G5-111', '999000123'] On Wednesday, February 27, 2019 at 7:46:54 AM UTC-8, Kai Stian Olstad wrote: > > On 27.02.2019 00:09, Ryan

[ansible-project] Re: Combine values from multiple lists

2019-02-26 Thread Ryan
Sorry, the output should be: DIMM1 G5-111 999000123 DIMM2 G5-111 999000440 DIMM3 G5-111 999000554 On Tuesday, February 26, 2019 at 3:09:33 PM UTC-8, Ryan wrote: > > > How would I go about printing the values from three lists, so that each > line contains elements fr

[ansible-project] Combine values from multiple lists

2019-02-26 Thread Ryan
How would I go about printing the values from three lists, so that each line contains elements from each list? For instance, I can print the values from the lists using: msg: - "Memory: {{ memoryLocator.stdout_lines }}" - "Memory: {{ memoryPN.stdout_lines }}" - "Memory: {{

Re: [ansible-project] What is the proper way to add a loop for a whole playbook ?

2018-11-13 Thread ryan prihoda
I ended up restructuring my vars a bit: - name: archive logs hosts: localhost vars: - date: "{{ lookup('pipe', 'date -d \"-1 month\" +\"%m-%Y\"') }}" - customers: - { name: 'customer1', archive: 'customer1.tgz', bucket: 'customer1-log-archive' } - { name: 'customer2',

Re: [ansible-project] What is the proper way to add a loop for a whole playbook ?

2018-11-13 Thread ryan prihoda
This play is only ran locally. I meant to loop through the customers so that I could have {{ item.customer }} {{ item.archive }} {{ item.bucket }} available as variables in each task in my playbook without having to add the same loop at the end of each task. On Tue, Nov 13, 2018 at 8:56 AM Brian

[ansible-project] What is the proper way to add a loop for a whole playbook ?

2018-11-13 Thread ryan prihoda
Normally I'd add my loop at the end of each task but my playbook is growing rather long. How do I set variables in the playbook so that each task will loop though them ? Something like this - name: archive logs hosts: localhost vars: date: "{{ lookup('pipe', 'date -d \"-1 month\"

[ansible-project] Re: Do YAML inventory plugins support inheritance?

2018-10-19 Thread Ryan Brown
Guy, It looks like the specific case you have of filtering based on a given tag can be solved without having several inventories. If you use the `constructed` part of inventory plugins, https://docs.ansible.com/ansible/2.7/plugins/inventory/constructed.html which lets you do all kinds of

[ansible-project] nmcli team slave creation error CentOS 7.4

2018-04-18 Thread ryan prihoda
Has anyone seen this error before ? There is no "slave-type" in the nmcli module. "msg": "Error: Failed to modify connection 'em1': connection.slave-type: Cannot set 'master' without 'slave-type'\n", --- - hosts: kvm0 remote_user: root tasks: - name: install needed network manager

[ansible-project] Re: Ansible Local script with Arguments yes/no having some issue

2017-11-21 Thread Ryan Fisher
Your script is being run, but it is exciting with a non-zero return code which causes the playbook to exit with a failure. This is the expected behavior, see this part of the output: "msg": "non-zero return code", "rc": 1, If you don't want the playbook to fail when the script exits with a

[ansible-project] Vaulted variables missing, password accepted

2017-11-21 Thread Ryan Fisher
I'm having an odd issue with vaulted variable files when running playbooks from my local machine. The vaulted vars are not defined, even though I am supplying the correct password at the prompt. I've also tried using --vault-password-file and the outcome doesn't change. I'm not sure how to

[ansible-project] Re: Is it possible to set the "hostname" in Ansible's console output?

2017-11-10 Thread Ryan Fisher
And I'm wrong... Use *--extra-vars* to override host vars: https://github.com/ansible/ansible/issues/18359#issuecomment-343341692 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

[ansible-project] Re: Is it possible to set the "hostname" in Ansible's console output?

2017-11-09 Thread Ryan Fisher
in my case. https://github.com/ansible/ansible/issues/18359#issuecomment-267540204 On Wednesday, November 8, 2017 at 5:38:32 PM UTC-8, Ryan Fisher wrote: > > I'm creating a dynamic inventory using ec2.py (which is working great, > thanks!). One minor annoyance I'

[ansible-project] Re: Is it possible to set the "hostname" in Ansible's console output?

2017-11-09 Thread Ryan Fisher
:38:32 PM UTC-8, Ryan Fisher wrote: > > I'm creating a dynamic inventory using ec2.py (which is working great, > thanks!). One minor annoyance I'm running into is that the console output > that shows changes is labeled with the instances private IPs (as set by > *hostname_vari

[ansible-project] Is it possible to set the "hostname" in Ansible's console output?

2017-11-08 Thread Ryan Fisher
I'm creating a dynamic inventory using ec2.py (which is working great, thanks!). One minor annoyance I'm running into is that the console output that shows changes is labeled with the instances private IPs (as set by *hostname_variable* or *[vpc_]destination_variable*). It would be nice to

[ansible-project] ec2_win_password unable to parse key file

2017-09-21 Thread Ryan Howe
output from the play. It kind of feels to me like it thinks a password is being given even though I don't mention the parameter in the play. As such, it's existing because the key is not encrypted. Thank you Ryan ansible-playbook 2.4.0.0 config file = None configured module search path = [u

Re: [ansible-project] Using with_fileglob is not behaving how I expect it to, am I missing something?

2017-09-13 Thread Ryan Fisher
get, I recommend > using the `find` module, registering the results, and then using a > `with_items` over the results in a later task. > > On Wed, Sep 13, 2017 at 11:42 AM, Ryan Fisher <rfis...@gmail.com > > wrote: > >> I'm attempting to use the file module to del

[ansible-project] Using with_fileglob is not behaving how I expect it to, am I missing something?

2017-09-13 Thread Ryan Fisher
I'm attempting to use the file module to delete some cruft left over after installing Wordpress and I'm getting a not found warning when the task executes. Not sure what I'm doing wrong... On the target host, the path and files exist: $ ls /var/www/wordpress $

[ansible-project] Built-in variable that stores playbook name?

2017-08-15 Thread Ryan
I am creating log files where I use the playbook name in the name of the log file. I am just hard coding the name into the playbooks, but I was wondering if there was a built-in variable that stores "test" if the playbook called was test.yml. Sort of like how "basename $0" or "${0##*/}"

Re: [ansible-project] Add conditionals to debug msg

2017-08-15 Thread Ryan
. Thanks! On Monday, August 14, 2017 at 3:13:25 PM UTC-7, Kai Stian Olstad wrote: > > On 14. aug. 2017 23:58, Ryan wrote: > > Thanks for the detailed reply. > > > > - name: Check for ECC's > > shell: ipmitool sel list | grep -i ecc

Re: [ansible-project] Add conditionals to debug msg

2017-08-14 Thread Ryan
rror while evaluating conditional (sel_out.rc > 1): 'dict object' has no attribute 'rc'"} On Saturday, August 12, 2017 at 1:43:10 AM UTC-7, Kai Stian Olstad wrote: > > On 12. aug. 2017 04:09, Ryan wrote: > > I tried adding "changed_when" for when sel_out is not

Re: [ansible-project] Re: Possible to set default value for missing key when using with_items and when?

2017-08-13 Thread Ryan Fisher
ernatively for 'when' you can test if the value is defined: > > when: item.my_var is defined and my_var == .... > > kind regards > Pshem > > > On Mon, 14 Aug 2017 at 13:25 Ryan Fisher <rfis...@gmail.com > > wrote: > >> It would be nice if there was a

[ansible-project] Re: Possible to set default value for missing key when using with_items and when?

2017-08-13 Thread Ryan Fisher
It would be nice if there was a way to assign the key with a default value. That way all the objects can be passed to with_items and skipped by when, which will show them in the log/output. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

[ansible-project] Re: Possible to set default value for missing key when using with_items and when?

2017-08-13 Thread Ryan Fisher
It seems that I can use selectattr to accomplish this. Example: @>>> from jinja2 import Template @>>> t = Template("{{ some_var|selectattr('allow', 'defined')|list }}") @>>> json = { @... "some_var": [ @... { @...

[ansible-project] Possible to set default value for missing key when using with_items and when?

2017-08-13 Thread Ryan Fisher
I'm trying to avoid having to put a key into every host_vars that uses a role that executes against multiple environments. Maybe I'm thinking about this wrong? *host_vars:* --- some_var: - name: 'one' param: 'foo' flag: False - name: 'two' param: 'bar' # no flag

Re: [ansible-project] Add conditionals to debug msg

2017-08-11 Thread Ryan
} CPU Count: {{ ansible_processor_count }}" - "Memory: {{ ansible_memtotal_mb }}" - "ansible processor count: {{ ansible_processor_count }}" - "Log File: {{ logfile }}" - "{{ out.stdout.split('\n') }}"

Re: [ansible-project] Add conditionals to debug msg

2017-08-11 Thread Ryan
There seems to be a paste formatting issue. Under vim name and debug are in the same column. They were not when I pasted them in the last reply. On Thursday, August 10, 2017 at 11:25:52 PM UTC-7, Ryan wrote: > > > Sorry, I will attache the error next time. > > I tried indenting

Re: [ansible-project] Add conditionals to debug msg

2017-08-11 Thread Ryan
ck Visser wrote: > > Not sure what you mean by 'it doesn't like this method'? I'm guessing > you're getting an error - which would have been helpful in diagnosing the > issue. > > So again, guessing, and hard to see from this message, but it looks like > the ind

[ansible-project] Add conditionals to debug msg

2017-08-10 Thread Ryan
How do I add a conditionals to debug msg lists? - name: Print results debug: msg: - "Board: {{ ansible_product_name }}" - "CPU: {{ ansible_processor[1] }} Cores: {{ ansible_processor_cores }} CPU Count: {{ ansible_processor_count }}" -

[ansible-project] Re: Setting Variables Conditionally

2017-08-08 Thread Ryan
ing_7' in ansible_fact else 200 if 'string_8' in ansible_fact }}" On Monday, August 7, 2017 at 8:08:40 PM UTC-7, Ryan wrote: > > I need to set some variables that are the same no matter the client, and > other variables need to be set conditionally based on values from Ansible > fa

[ansible-project] Setting Variables Conditionally

2017-08-07 Thread Ryan
I need to set some variables that are the same no matter the client, and other variables need to be set conditionally based on values from Ansible facts. Basically I need an if/else case statement. What is the correct way to do this? Some simple examples can be found here

Re: [ansible-project] Cisco NXOS : Parsing SNMP trap hosts from command output

2017-08-02 Thread Ryan Lambert
/method doesn't offend anyone. :) Link: https://github.com/vPacketNinja/snmp-replace Hopefully that is helpful for you. Ryan On Wednesday, July 19, 2017 at 9:32:05 AM UTC-4, Gavin McKee wrote: > > Hi Ganesh, > > I think the first thing I'm trying to do is build a json object wi

[ansible-project] Re: Ansible: How to inherit between commands in a with_items loop

2017-08-02 Thread Ryan
/ shell: source ā€˜{{ source_file }}ā€™ && ./test1 On Tuesday, August 1, 2017 at 11:02:59 AM UTC-7, Ryan wrote: > > I am creating a playbook that requires sending multiple commands. It > looks like one reasonable way to do this is to use a with_items loop. Is >

[ansible-project] Ansible: How to inherit between commands in a with_items loop

2017-08-01 Thread Ryan
I am creating a playbook that requires sending multiple commands. It looks like one reasonable way to do this is to use a with_items loop. Is this correct? If so, the commands are all needed by the final command, but the commands do not seem to inherit what is set before them, such as

Re: [ansible-project] Ansible do-until loop in check mode

2017-06-27 Thread Ryan Groten
Figured out a different solution. I added this conditional to my task: when: not ansible_check_mode Thanks for the help! On Tuesday, 27 June 2017 13:22:56 UTC-6, Ryan Groten wrote: > > One slight wrinkle, my example wasn't exactly what I'm trying to do. > Here's my real until loop:

Re: [ansible-project] Ansible do-until loop in check mode

2017-06-27 Thread Ryan Groten
lue is two attributes deep (ie: cluster_health.*json.status* versus response.rc) On Tuesday, 27 June 2017 12:17:03 UTC-6, Kai Stian Olstad wrote: > > On 27. juni 2017 20:12, Kai Stian Olstad wrote: > > On 27. juni 2017 19:40, Ryan Groten wrote: > >> Thanks for the re

Re: [ansible-project] Ansible do-until loop in check mode

2017-06-27 Thread Ryan Groten
That works just fine, thanks Kai! On Tuesday, 27 June 2017 12:17:03 UTC-6, Kai Stian Olstad wrote: > > On 27. juni 2017 20:12, Kai Stian Olstad wrote: > > On 27. juni 2017 19:40, Ryan Groten wrote: > >> Thanks for the response Kai, in this case I want the task no

Re: [ansible-project] Ansible do-until loop in check mode

2017-06-27 Thread Ryan Groten
Thanks for the response Kai, in this case I want the task not to run at all in check mode, only execute the loop when the play is run in execute mode. On Tuesday, 27 June 2017 11:26:06 UTC-6, Kai Stian Olstad wrote: > > On 27. juni 2017 19:19, Ryan Groten wrote: > > Using a stand

[ansible-project] Ansible do-until loop in check mode

2017-06-27 Thread Ryan Groten
Using a standard do-until loop like this: > - shell: /bin/true > register: result > until: result.rc == 0 > retries: 5 > delay: 10 Anytime I run the playbook in check mode this task will fail (because the result variable is not set). It seems like the until part

[ansible-project] Extract string from local file with lookup and regex

2017-06-01 Thread Ryan Oakes
I have a local file within the role called "car_notes" that looks like: Model: Honda Year: 1989 Color: Green I'd like to be able to look up the "Model" with a regex. So, I do something like this to get the info from the file: - name: Grab Notes set_fact: notes_file: "{{

Re: [ansible-project] Ansible On Read-Only Systems

2017-05-31 Thread Ryan
I found that if i enabled read-write to ~/.ansible_async, I was able to execute a playbook with async and a non-zero value for poll. It would be very helpful to know if there are any additional directories that need write access. I can also look into enabling pipelining, but if it avoids most

[ansible-project] Ansible On Read-Only Systems

2017-05-31 Thread Ryan
The host that I am executing the Ansible commands from is a standard RHEL 7.2 install. The remote nodes however are booting a read-only root file system (RHEL 7.3), with a layer of writable directories that I can specify, and are copied into tmpfs. I added /root/.ansible to the writable

Re: [ansible-project] Altering dependency role order

2017-05-30 Thread Ryan Oakes
Thanks for the reply. I decided to just use a requirements.yml file and invoke the role with the "include_role" module to get the desired behavior. On Tuesday, May 30, 2017 at 8:10:49 PM UTC-4, Brian Coca wrote: > > Dependency always run first. Either reverse the dependencies or bypass > by

[ansible-project] Best practices for requirements.yml

2017-05-30 Thread Ryan Oakes
people usually store this file? I was looking at ansible-examples and popular Ansible Galaxy roles and didn't see any examples, so I'm curious what those who utilize this approach usually do. Thanks! -Ryan -- You received this message because you are subscribed to the Google Groups "An

[ansible-project] Altering dependency role order

2017-05-26 Thread Ryan Oakes
role_one, role_two always gets run first. Is there any way to alter this behavior? Or does having a dependency listed mean that dependency will always run first? Any help would be appreciated! -Ryan -- You received this message because you are subscribed to the Google Groups "An

[ansible-project] msg: hostname module cannot be used on platform Linux (Neon)

2017-05-25 Thread Emmet Ryan
I recently upgraded to Ansible 2.3 for KDE Neon support and ran into the following failure when running a playbook against it: msg: hostname module cannot be used on platform Linux (Neon) And this is the task it failed on: - name: set hostname hostname: name: "{{ host }}" Has

[ansible-project] msg: hostname module cannot be used on platform Linux (Neon)

2017-05-25 Thread Emmet Ryan
Has anyone else run into issues using the hostname module on KDE Neon hosts? I recently updated to 2.3 which introduces Neon support. This is the task: - name: set hostname hostname: name: "{{ host }}" and the resulting output: TASK [workstations/common : set hostname]

[ansible-project] Issue with become_user

2017-05-01 Thread Ryan Oakes
is set to "ec2-user" , so that's the only thing I could think of that could be causing an issue. If anyone can point me in the right direction I'd appreciate it! Thanks. -Ryan -- You received this message because you are subscribed to the Google Groups "Ansible Project&quo

[ansible-project] Error setting up HTTPS endpoint for WinRM

2017-02-06 Thread ryan . mensching
I have been working on an issue with getting the HTTPS endpoint for WinRM to bind to the self signed cert the Ansible setup script creates. I'm pretty stumped at this point, it seems I had it working at one time but after rebuilding the workspace I am back to square one. All controls I can

[ansible-project] Re: Anyone using ansible to manage nexus and ios-xr devices?

2016-09-19 Thread Ryan Jones
sible 2.1 are lacking, and I am having having > trouble getting the modules for 2.2 working (posted the problem just a bit > ago). > > Thanks, > > Steven. > > On Thursday, September 15, 2016 at 3:43:26 PM UTC-4, Ryan Jones wrote: >> >> I'm trying to put toge

[ansible-project] Anyone using ansible to manage nexus and ios-xr devices?

2016-09-15 Thread Ryan Jones
I'm trying to put together a poc. The issue is i have no idea where to start. I'm somewhat familiar with ansible for servers but I'd like to start managing my network infra with ansible. O e of the questions i have is how so you test a change is valid? And how to automate these tests. I'd like

[ansible-project] lineinfile able to change all occurrences of pattern?

2016-09-06 Thread Ryan Groten
if there's a cleaner way. Thanks, Ryan -- 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 post to

[ansible-project] oVirt/RHEV storage management module

2016-08-03 Thread Ryan Groten
. https://github.com/ansible/ansible-modules-extras/pull/2509 Ryan -- 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...@google

[ansible-project] Re: Ansible plugin for FreeIPA

2016-08-03 Thread Ryan Groten
Awesome, been looking for something like this. You should make a pull request to ansible-modules-extras! On Wednesday, 3 August 2016 04:00:40 UTC-6, Thomas Krahn wrote: > > Hi All, >> > > i've started an Ansible Module to manage IPA entries like users, groups, > sudo rules, ... . Feel free to

[ansible-project] Re: ssh retry functionality (for flaky network responses)

2016-08-03 Thread Ryan Groten
I've had moderate success by changing the ControlPersist in ssh_args parameter in ansible.cfg: ssh_args = -o ControlMaster=auto -o ControlPersist=300s That said, on big playbooks with a couple hundred hosts/tasks I generally still have at least one or two generic connection failures. Like you

[ansible-project] Re: How to install RHEL on mutiple nodes using ansible

2016-07-29 Thread Ryan Groten
We use Ansible to automatically deploy new RHEL servers from an existing template (with cloud-init enabled). Specifically the ovirt module to launch VMs from templates in ovirt, but the same could easily be done with other major hypervisors. On Tuesday, 26 July 2016 18:33:34 UTC-6, PUJA

Re: [ansible-project] Test that a variable is a valid IP address

2016-07-29 Thread Ryan Groten
Yep that was it, thanks a lot! On Thursday, 28 July 2016 15:45:29 UTC-6, Kai Stian Olstad wrote: > > On 28. juli 2016 23:19, Ryan Groten wrote: > > I'm trying to create a task that verifies a variable is a valid IP > address. > > The task should pass if it is va

[ansible-project] Re: Change exit code of ansible-playbook if there are any changes

2016-07-28 Thread Ryan Groten
How about detecting the changed task(s) from within the playbook itself and create another task that calls a Jenkins API (assuming that's possible)? Eg: - name: Check for divergence command: register: is_diverged - name: Call Jenkins to un-diverge command: when: is_diverged | changed

[ansible-project] Test that a variable is a valid IP address

2016-07-28 Thread Ryan Groten
ailed": true, "msg": "The conditional check '10.1.4.232 != False' failed. The error was: error while evaluating conditional (10.1.4.232 != False): float object has no element 4"} Any suggestions? Thanks, Ryan -- You received this message because you are subscribed to

[ansible-project] subsequent jobs

2016-07-10 Thread Ryan R.
Hello! I like how SCM update can be run just before a job, by selecting "Update on launch". I would like for a job to run the same way, just before a job. Is it possible that Job-Two can be set to automatically run when Job-One finishes? -- You received this message because you are

[ansible-project] with_dict keys with "." was working in Ansible 1.9.4 but not with 2.1.0

2016-04-22 Thread Ryan Groten
_warnings=False in ansible.cfg. fatal: [rlxpool51.corp.ads]: FAILED! => {"failed": true, "msg": "with_dict expects a dict"} It seems like the "." in the key name is causing confusion, although I'm not really sure why (or how to fix it). Thanks, Ryan --

Re: [ansible-project] Syntax for running commands with braces in them

2016-04-14 Thread Ryan Groten
nt es from rebalancing missing shards uri: url: "http://localhost:9200/_cluster/settings; method: PUT body: "{{ es_disable_allocation|to_json }}" On Tuesday, 12 April 2016 14:12:46 UTC-6, Ryan Groten wrote: > > I must be close, but it's not working with

Re: [ansible-project] Syntax for running commands with braces in them

2016-04-12 Thread Ryan Groten
settings; > method: PUT > body: > transient: > cluster.routing.allocation.enable: "none" > body_format: json > > On Tue, Apr 12, 2016 at 10:29 AM, Ryan Groten <rgr...@gmail.com > > wrote: > &

Re: [ansible-project] Syntax for running commands with braces in them

2016-04-12 Thread Ryan Groten
uri: > url: "http://localhost:9200/_cluster/settings; > method: PUT > body: > transient: > cluster.routing.allocation.enable: "none" > body_format: json > > On Tue, Apr 12, 2016 at 10:29 AM, Ryan Groten <rgr...@gmail.com

[ansible-project] Syntax for running commands with braces in them

2016-04-12 Thread Ryan Groten
inja string (I think?) command: {{ 'curl -XPUT "http://localhost:9200/_cluster/settings; -d'{ "transient" : { "cluster.routing.allocation.enable" : "none" } }'' }} Thanks, Ryan -- You received this message because you are subscribed to the Google Groups "Ansib

[ansible-project] Struggling to make ec2_vpc Idempotent

2016-02-01 Thread Ryan Mes
down votefavorite I am creating a VPC in AWS using Ansible. The following play is run - name: create vpc with multi-az subnets ec2_vpc: region: "{{ region }}" cidr_block: "{{ vpc_cidr_block

[ansible-project] Issue with role variables

2016-01-14 Thread Ryan Hunter
ot;{{ uber_port }}" - uber I keep getting: fatal: [default]: FAILED! => {"failed": true, "msg": "ERROR! 'port' is undefined"} in the role zuul. This play works fine with ansible 1.9 Did something related to role parameterization get deprecated? Thanks

[ansible-project] File lookup within a role

2015-08-03 Thread Ryan Kane
Hi - I'm new to Ansible and trying to create a role that contains a file, the contents of which are passed to a second role. Example Structure: RoleA files - foo.txt meta - main.yml The contents of main.yml are: --- dependencies: - {role: RoleB, data: {{ lookup('file', 'foo.txt')

[ansible-project] Digital ocean dynamic inventory - just plain old barely works

2015-02-05 Thread Ryan Rawson
So I am doing a digital ocean thing. I saw the dynamic inventory scripts and thought my problems were solved. But turns out, it only covers the simplest case and doesn't help you further. The background here is I'm doing a little bit of a hbase thing. So I have created some hosts using the

[ansible-project] Merging of host_vars and group_vars?

2014-08-08 Thread ryan
I have a playbook with a role that creates users that are defined in group_vars/all, similar to this role https://galaxy.ansible.com/list#/roles/51. When I define a user in the host_vars/foo it takes over precedence and does not add the users I have in group_vars/all. I have set

Re: [ansible-project] Saving file before it is changed

2014-07-17 Thread Ryan Schulze
Something like the backup option in the template module? http://docs.ansible.com/template_module.html On 7/17/2014 9:06 AM, Mauricio Tavares wrote: Let's say I have a template that will reapply my, say, /etc/ssh/sshd_conf if it has changed. How can I save the old one just in case?

[ansible-project] Conditional Includes, Roles and Multiple Playbooks

2014-07-07 Thread Ryan Garrett
I am trying to figure out the structure for how I am going to use Ansible and am having some design issues. I would like to have multiple playbooks in my roles, each with a subset of tasks I need to be done. E.g. - a playbook for System Updates, a playbook for deploying our app, a playbook for

Re: [ansible-project] using Ansible for 100% of rails development

2014-06-11 Thread Ryan Rix
%3Dfalsedelayms%3D3000#slide=id.g18178d75e_094 (Slide 21 if the link explodes) that I really want to try out soon. Ryan -- 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] Ansible Lists and Sets problem working with Set types in Ansible

2014-05-21 Thread Ryan Hobbs
I am attempting to create a unique list of values between two lists and I am creating a set based on the documentation described here http://docs.ansible.com/playbooks_variables.html#set-theory-filters According to the documentation: To get a union of two lists: {{ list1 | union(list2) }}

[ansible-project] Cannot change to '/root/..' with sudo_user

2014-05-21 Thread Ryan Stewart
I'm running a playbook where remote_user is root, and on some tasks, I use sudo: yes with sudo_user: jenkins to do some per-user setup. At the moment, I'm trying to clone a git repo. Whether I use the git module or the command module to run git clone directly, it keeps failing with: stderr:

[ansible-project] Ansible upgrade testing - version number isn't tracking?

2014-05-12 Thread Ryan Mitchell
Hi all - I'm testing out upgrading to a later version of Ansible and how my playbooks would need to be modified prior to actually doing the upgrade. In order to test this out, I'm doing the following: * Deleting /usr/bin/ansible* (yes - I had done the install of ansible up until now - due to

  1   2   >