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:
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
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
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
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
If a regexp matches multiple lines in a file, lineinfile will only change
the first occurrence. Is there a way to make change them all? I saw
someone used another task to count the number of occurrences of a pattern
and then loop using with_sequence in the lineinfile task but I'm wondering
Posted this on the oVirt mailing list but figured there may be some
interested parties here as well. I wrote a module for storage management
and created a pull request to have it added as an Extra module in Ansible.
It can be used to create/delete/attach/destroy disks in oVirt/RHEV.
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
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
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
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
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
I'm trying to create a task that verifies a variable is a valid IP address.
The task should pass if it is valid, and fail if it's not.
I feel like I'm close, but not quite there with this:
- name: Verify IP address
assert: { that: "{{ requested_ip | ipaddr }}" }
always_run: yes
This
When setting sysctl parameters I use the following variable:
kernel_params:
kernel.sem: 250 32000 100 128
kernel.shmmni: 4096
net.core.rmem_max: 4194304
net.core.rmem_default: 262144
net.core.wmem_max: 1048576
net.core.wmem_default: 262144
...
Then in my role I do the following:
-
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
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:
>
&
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
I am trying to execute a task that runs the following command (which
includes a number of quote, brackets, colons, etc):
command: curl -XPUT "http://localhost:9200/_cluster/settings; -d'{
"transient" : { "cluster.routing.allocation.enable" : "none" } }'
I tried escaping all the quotes and {},
18 matches
Mail list logo