[ansible-project] Re: strange behaviour with block statement in ansible 2.0

2016-02-27 Thread Ulrich Hochholdinger
Ignore the report, I found the error by myself ;-/ No bug! No feature! cheers Ulli Am Samstag, 27. Februar 2016 20:21:30 UTC+1 schrieb Ulrich Hochholdinger: > > Hi, > I'm experiencing a strange phenomenon with the block statement. If I > rearrange a when statement I get

[ansible-project] strange behaviour with block statement in ansible 2.0

2016-02-27 Thread Ulrich Hochholdinger
Hi, I'm experiencing a strange phenomenon with the block statement. If I rearrange a when statement I get syntax error. But the data-structure of both playbooks is the same: Play that works: --- - hosts: localhost connection: local tasks: - block: - debug: msg="The Message" when

[ansible-project] Re: Role do something after handler?

2015-11-12 Thread Ulrich Hochholdinger
Hi, xou can write a handler for every single Action, and notify all desired handlers when needed. Handlers are executed in the order inside the handlers list. theoretical example: tasks: - name: change config action: do something notify: - enable_handler - reload_handle

[ansible-project] Re: Role do something after handler?

2015-11-12 Thread Ulrich Hochholdinger
Hi, xou can write a handler for every single Action, and notify all desired handlers when needed. Handlers are executed in the order inside the handlers list. theoretical example: tasks: - name: change config action: do something notify: - enable_handler - reload_handle

[ansible-project] Re: ansible known_hosts module failed

2015-06-14 Thread Ulrich Hochholdinger
Hi, The known_hosts module expects a complete "known_hosts - line" as key value. The public key from /etc/ssh lists no hostname. So in your example the correct behaviour can be achieved by preceding the hostname: Example: ... - name: known_hosts known_hosts: path="/home/xiaoliang/.ssh/

[ansible-project] use password lookup together with vault?

2015-06-05 Thread Ulrich Hochholdinger
Hi, is it possible to keep the password information generated with the password lookup in a vault-encrypted file? I want to generate new random passwords for new machines and keep them idempotent. But the already generated passwords should be kept encrypted in the playbook e.g. as vault-file. "l

[ansible-project] Re: directory layout for grouping playbooks - ansible.cfg ?

2015-05-28 Thread Ulrich Hochholdinger
Hi, I'm also in the situation to get "many" different projects under control and use following directory structure: - one folder per project with dependeing playbooks and roles - global inventory with one folder per stage (since the project share hosts I made only one inventory ) - group_vars an

Re: [ansible-project] Re: Proper escaping quotes and braces

2015-04-30 Thread Ulrich Hochholdinger
Hi, Alternatively you can use the "> notation" : shell: > curl -X POST http://{{ influxdb.host }}:{{ influxdb_client_port }}/db?u=root&p=root -d "{'name': 'spark-metrics'}" Cheers Ulli Am 30.04.2015 10:53 schrieb "Serega Sheypak" : > Hi, trying to execute task: > > - name: Create spark-met

[ansible-project] Re: ansible-playbook: How to gather facts from machine Y although you run with --limit="X"

2015-01-10 Thread Ulrich Hochholdinger
Hi Eric, You can describe the inventory on the commandline (look on the trailing comma in the inventory-option ;-D): ansible-playbook -i"X,Y," site.yml then inside your playbook have one "hosts: all" only for fact gathering and another for "hosts: X" for the tasks to run on host X. Cheers

[ansible-project] Re: Calculating with Variables?

2015-01-05 Thread Ulrich Hochholdinger
ed to int and I had no other Idea than to do this inside the generation of the list. Cheers Ulli PS: I like ansible more and more especially the really cool and helpfull community ;-D Am Sonntag, 4. Januar 2015 02:02:04 UTC+1 schrieb Ulrich Hochholdinger: > > Hi, > I just starte

[ansible-project] Calculating with Variables?

2015-01-05 Thread Ulrich Hochholdinger
Hi, I just started playing around with ansible and tried to achieve a simple operations task with it: Iterate over all nodes of my Xen-Cluster -- get free_memory of every node and sum up those values. next step would be making a decision e.g. spawning a new VM without overprovisioning the clust