[ansible-project] Ansible and Consistent Network Device Naming

2014-10-18 Thread Marcin Prączko
Dear ansible users and developers. As I can see, all modern systems are going to solutions for consistent Network Device Naming. A bit details to read here: - http://ask.xmodulo.com/change-network-interface-name-centos7.html -

[ansible-project] Defining variables and save them as json file.

2014-07-24 Thread Marcin Prączko
Hi, I struggle with some issue with variables definition which I am not totally understand and can't find help in ansible docs. I am trying to have nice variables structure and save it as json file (re-use as local facts). So I have *groups_vars* file: g_core_vars: version : 0.1.0

[ansible-project] Dynamic inventories and variables best practices.

2014-07-23 Thread Marcin Prączko
Hello ansible group, I would like to ask you for some advices related with dynamic inventories and variables. I read Dynamic Inventories documentation from asnbile however still don't see clear picture about solution. So far ansible-tower is also not solution which I can focus on. So quick 'my

[ansible-project] Callback functions and local facts.

2014-05-13 Thread Marcin Prączko
Hello, I am trying to write my own callback function which logs information which I want to database, especially informations from local facts. We have localfacts in json mode and I can easly get access to them from Ansbile it self, however everything what I've tried in terms access them from

[ansible-project] Re: Callback functions and local facts.

2014-05-13 Thread Marcin Prączko
And still have question. Is there any way to use facts_get with DICT? For example: facts.get('ansible_local[apache]) ??? or facts.get('ansible_interfaces[eth].some_argument) ??? Best regards, Marcin Praczko -- You received this message because you are subscribed to the Google Groups

[ansible-project] Re: Different group vars based on the inventory, aka staging vs prod

2014-04-03 Thread Marcin Prączko
Hi Kalman, I have to deal with similar challange as well. IMHO design is good however with complex configuraiton is starting quite challanging. We have much more environment to setup for the same product and is not easy to do that with inventories and groups. (for example we have Dev on local

[ansible-project] Re: Run role based on local facts - if variable is not defined.

2014-04-03 Thread Marcin Prączko
Hi, Can I have a bit of more light of this please? I checked what means short circuit evaluation (http://en.wikipedia.org/wiki/Short-circuit_evaluation) however my evaluation is not working. roles: - { role: test_roleversion, when: ansible_local.apache.version not defined or

[ansible-project] Re: Run role based on local facts - if variable is not defined.

2014-04-03 Thread Marcin Prączko
Hi, Seems be working - that to be some TABS instead of spaces on the begining of line: roles: - { role: test_roleversion, when: ansible_local.apache.version is not defined or module.version ansible_local.apache.version}Best regards, Thanks for help. Marcin Praczko -- You

[ansible-project] Re: Run role based on local facts - if variable is not defined.

2014-04-03 Thread Marcin Prączko
Hi, Don't know why worked only once, no luck with this still. Givining up.: ( :( This syntax at a least run condition everytime and not reporting error: roles: - { role: test_roleversion, when: { ansible_local.apache.version is not defined or module.version

[ansible-project] Re: Run role based on local facts - if variable is not defined.

2014-04-03 Thread Marcin Prączko
Hi, I think problem lies in multi level of variable: Checking if ansible_local is defined working as expected, however checking ansible_local.somevars - here automatically raise and error. This means that variable must be check from top level to bootom. If ansible_local is not defined and

[ansible-project] Run role based on local facts - if variable is not defined.

2014-04-02 Thread Marcin Prączko
Good morning. I am trying using local facts for tracking version of the role, and run this role only if version increased (version kept locally within role comparing with version from local fatcs). So this is how is working: Role folder - vars/main.yml - tasks/main.yml So this is example

[ansible-project] Json and local facts.

2014-04-02 Thread Marcin Prączko
Hi, I am working on some tasks related with local facts and not sure whether followig issue is a bug or is designed. Following ansible documentation localfacts can be in JSON or INI format. I've choosen JSON format - is much more easier to write variables like this: module: name: apache

[ansible-project] Re: Ansible conditions and logics

2014-04-02 Thread Marcin Prączko
Hi, I think that you have to find best way which works for you. For example I have to setup quite a lot munin symlinks for checks which depends of server role. 1. Running this via ansible was really slow and caused quite complicated solution in terms of map links to roles. 2. So I decided

[ansible-project] Visibility and documentation of ansible playbook.

2014-02-17 Thread Marcin Prączko
Dear ansible users, I am using ansible and must admit that I am quite happy with it. Challanges which I started to have are: 1. Documentation from yaml files (roles / playbook / etc). 2. Visibility what ansible will do. A bit more about this: # 1. I started using sphinx-doc for documentation

[ansible-project] Ask for variable value if variable not defined.

2014-01-28 Thread Marcin Prączko
Hi, Have question whether is possible (ansible 1.4.2 ) setup prompt for volue for variable in variable is not defined. For example: First run of playbook: - variable is not defined - ask for value - task write value of variable to some ansible vars file ... Do other tasks... Next run of