I actually tend to use the copy module, like so:
- copy: content="" dest=/path/to/file force=no
force=no keeps it from replacing the file when it exists and the content is
different.
http://docs.ansible.com/ansible/copy_module.html
On Monday, December 28, 2015, Koji Tanaka wrote:
> Hello Ansi
RESOLVED. I found that adding "changed_when: False" does the trick, as
suggested on this issue.
https://github.com/ansible/ansible-modules-core/issues/170
Thank you,
Koji
On Mon, Dec 28, 2015 at 10:27 PM, Koji Tanaka wrote:
> Hello Ansible Community,
>
> I'd like to create a task which ensures
Hello Ansible Community,
I'd like to create a task which ensures a file exists(if a file
doesn't exist, it should create an empty file). Now I use file
module's state=touch, but it always finishes as changed. Is there a
way to prevent it from touching when file exists?
Best regards,
Koji
--
You
So I used to have one fairly long main.yml playbook that was used to
perform a number of similar-tasks, one of which was to install rbenv, the
ruby management tool.
---
- name: create group titled deploy
group: name=deploy state=present
- name: update apt-cache
sudo: yes
apt
I am working with AWS instances currently and want to transfer all the
configuration that is currently running on AWS master node to the multiple
AWS slave nodes with Ansible only. Slave nodes may be 2 or 3 or may be
more. Is it possible with the Ansible-Pull model to automatically scale the
Hi guys,
sorry if this is a newbie question, but looking around I couldn't find
an answer...
I have my own CA, and create x509 key and certificate for each server.
What is the best way to distribute them with ansible? Currently, they
are distributed via host_vars, and certificate contents i
Never really looked into it, but if/when using netcat, does that mean that
from your proxy host / bastion to the target host, the connection is in
clear text? I would assume that to be the case?
Alex
On 28 Dec 2015 12:11 a.m., "Tim Fletcher" wrote:
> Would using a netcat tunnel work for you?
>
>
I may try to check the value of "attempts", and fail the task if we reach
10 attempts.
On Friday, 18 December 2015 12:01:23 UTC, jepper wrote:
>
> I am looking for a way for below to cause a failure, if the health check
> fails to see an "UP" message after 10 attempts.
>
> - name: health check
Ignore pre_tasks in second play.
The thing to note is the usage of hostvars.
On Monday, December 28, 2015 at 12:50:57 AM UTC+5:30, Arbab Nazar wrote:
>
> Here is my problem I need to use one variable 'RDS_SG_NAME' and then
> append '_id' to it's value to get another variable name which value I
I do this generally, if I want to use a variable name as a value to another
variable
---
>
> - hosts: localhost
> connection: local
> gather_facts: no
> pre_tasks:
> - set_fact:
> abc_id: 'some-value'
> RDS_SG_NAME: 'abc'
>
> - hosts: localhost
> connection: local
> gathe
I keep getting this error once in every 4/5 times.
fatal: [xxx]: FAILED! => {"failed": true, "msg": "ERROR! failed to resolve
remote temporary directory from
ansible-tmp-1451292385.49-145367138177040:
`( umask 22 && mkdir -p \"$( echo
$HOME/.ansible/tmp/ansible-tmp-1451292385.49-14536713817
11 matches
Mail list logo