[ansible-project] Custom library placed within a role not found for multiple-play playbook

2019-01-29 Thread Yassen Damyanov
Hi all, We have a multi-play playbook like this: --- - name: Play One hosts: all roles: - role.one tags: [tagone] - name: Play Two hosts: group1 roles: - role.two - role.three tags: [tagtwo] - name: Play Three hosts: group2 roles: - role.four - role.five

Re: [ansible-project] `ansible -m ping` does not honor ansible.cfg's remote_user [SOLVED]

2018-12-12 Thread Yassen Damyanov
On Wednesday, December 12, 2018 at 2:35:35 PM UTC+2, Kai Stian Olstad wrote: > > There is no section called global in ansible.cfg, but you have one > called defaults that takes inventory and remote_user > That was it, Kai, thanks a bunch. Issuing a warning for such nonsense section names

[ansible-project] `ansible -m ping` does not honor ansible.cfg's remote_user

2018-12-12 Thread Yassen Damyanov
Hi all, Trying to ping a host prepared to accept the ping as a remote user root, I get: $ ansible -m ping master -vvv ansible 2.7.4 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/ydamyanov/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']

[ansible-project] Re: How to handle data common to a set of roles?

2016-01-18 Thread Yassen Damyanov
Chris, thanks; so then using task-less roles doesn't look so bad... I'll give a try to both approaches and see. Thanks again! -Y. On Thursday, December 31, 2015 at 6:52:57 PM UTC+2, chris meyers wrote: > > The task-less role is good because you can capture the dependency fully in > the role

[ansible-project] Re: How to handle data common to a set of roles?

2015-12-30 Thread Yassen Damyanov
Alexey, Thanks for pointing me to the right direction. This seems to be "The Right Way" to do it ;) I am reading that page right now. Cheers, -Y. On Wednesday, December 30, 2015 at 3:27:21 PM UTC+2, Alexey Vazhnov wrote: > > You can place your common variables in group_vars/all/. > Did you read

[ansible-project] How to handle data common to a set of roles?

2015-12-30 Thread Yassen Damyanov
Guys, Could you suggest a way to handle data common to a set of roles, e.g. the IP address of the DNS or the DHCP server on the network? These seem to be fixed for now but can change in future and I'd like to have a convenient way to do a change in one place and then have all roles working

[ansible-project] Re: Loop on Route53 with items

2015-06-21 Thread Yassen Damyanov
Never had to deal with Amazon stuff but here my 2 cents: your first method fails because of wrong indentation: On Thursday, June 18, 2015 at 6:24:22 PM UTC+3, Louis Borsu wrote: Hi, I would like to loop on items in an inventory group with the module Route53 I tried to methods but both

[ansible-project] Re: How to choose between ansible_eth0 and ansible_eth1 depending on a parameter?

2015-06-18 Thread Yassen Damyanov
On Thursday, June 18, 2015 at 8:02:20 PM UTC+3, Anand Buddhdev wrote: Hi Yassen, You have to use the hostvars dictionary, like this: {{ hostvars[inventory_hostname]['ansible_'+ext_if].ipv4.address }} *Anand*: you nailed it, works great! Thank you! -Y. -- You received this message

[ansible-project] Re: rollback of applications

2015-06-18 Thread Yassen Damyanov
On Monday, June 15, 2015 at 3:38:49 PM UTC+3, skg wrote: How would you get ansible to deal with the following use case: An application, X version 1, is installed with it's configuration variables for version 1. Subsequently X version 2 is released with a differnt config variable set. I

[ansible-project] How to choose between ansible_eth0 and ansible_eth1 depending on a parameter?

2015-06-18 Thread Yassen Damyanov
My firewall-oriented roles need to use different network info when executed on different machines, depending on which interface is the external one and which is the internal one. Thus I need to be able to set e.g.: ext_if: eth0 int_if: eth1 and from here, ip network information to be taken

[ansible-project] Re: 'dict' object has no attribute

2015-06-17 Thread Yassen Damyanov
On Wednesday, June 17, 2015 at 4:52:27 PM UTC+3, Yassen Damyanov wrote: How about ansible_eth0.ipv4[0].address ? (note the zero index) My bad, this is OpenBSD specific (ansible_ifname.ipv4 is a list of dicts there). So just forget the above. -Y. -- You received this message because you

[ansible-project] Re: 'dict' object has no attribute

2015-06-17 Thread Yassen Damyanov
How about ansible_eth0.ipv4[0].address ? (note the zero index) -- 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

Re: [ansible-project] Re: simple rails app (login shell command)

2015-05-11 Thread Yassen Damyanov
Ivan, I have difficulties understanding you, so can you please help me clarify the issue (if it is still relevant): 1. Can you confirm that your primary issue is running bundle to install rails app dependencies? 2. Can you confirm that you now solve the issue via creating a wrapper script

Re: [ansible-project] Re: simple rails app (login shell command)

2015-05-11 Thread Yassen Damyanov
Please find comments inline below: On Mon, May 11, 2015 at 2:40 PM, Ivan Müller mulleri...@gmail.com wrote: Hi Yassen. I already solved it with that wrapper Code: - name: bundle install (install the rest of the gems) shell: /usr/local/rvm/wrappers/default/bundle

Re: [ansible-project] Re: detecting version of syslog-ng

2015-05-09 Thread Yassen Damyanov
Very elegant! -Y. -- 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 this group, send email to

[ansible-project] Re: detecting version of syslog-ng

2015-05-08 Thread Yassen Damyanov
On Wednesday, May 6, 2015 at 4:33:43 PM UTC+3, Randy Bush wrote: have a playbook bit to distribute syslog-ng.conf to a bunch of servers, some running syslog-ng 3.3 and some running 3.5. so there are two different configuration files. is there a way to detect which version a host is

[ansible-project] Re: Trying to run script from inside directory

2015-05-08 Thread Yassen Damyanov
On Friday, May 8, 2015 at 12:31:04 PM UTC+3, Yassen Damyanov wrote: On Friday, May 8, 2015 at 12:04:52 AM UTC+3, John Oliver wrote: I'm using 'unarchive' to extract a tarball to /tmp/ Inside, I have a shell script with includes references to relative paths. This made my script fail

[ansible-project] Re: simple rails app (login shell command)

2015-05-08 Thread Yassen Damyanov
On Monday, May 4, 2015 at 4:13:13 PM UTC+3, Ivan Müller wrote: Hi there before all thanks fot the amazing work that you already done Is only one thing that keep make me noise when I use Ansible, normally I use RVM to handle different versions of ruby and every time that i need to run a

[ansible-project] Re: Trying to run script from inside directory

2015-05-08 Thread Yassen Damyanov
On Friday, May 8, 2015 at 12:04:52 AM UTC+3, John Oliver wrote: I'm using 'unarchive' to extract a tarball to /tmp/ Inside, I have a shell script with includes references to relative paths. This made my script fail as it was looking for the files relative to whatever directory it's

[ansible-project] Re: detecting version of syslog-ng

2015-05-08 Thread Yassen Damyanov
Randy, FYI: the output of that script (after beautifying it a bit): { changed: false, rc: 0, ansible_facts: { rsyslog_ver: 5.8.6, } } (The trailing comma in the rsyslog_ver value is redundant but you should get the idea.) -- You received this message because you are

[ansible-project] Re: unarchive complaining about nonexistent file

2015-05-07 Thread Yassen Damyanov
It tries to set permission mode to extracted files, does not find this one (/tmp/dod_java_certs/certs/._ DODCA_25.cer) and breaks, which means it expects it based on tar archive file list I guess. I would suspect an incorrect / incomplete / broken tar archive. How about re-creating the

[ansible-project] Re: Installing pip packages into a virtualenv - where are they?

2015-04-30 Thread Yassen Damyanov
Toby, not really a reply to your searches but just an idea: why not bootstrap pip via get-pip.py (https://bootstrap.pypa.io/get-pip.py) and then use pip to install virtualenv and anything else? -Y. -- You received this message because you are subscribed to the Google Groups Ansible Project

[ansible-project] Re: Rendering a List in a Template

2015-04-24 Thread Yassen Damyanov
On Friday, April 24, 2015 at 5:43:30 PM UTC+3, Nathan Lannine wrote: Thank you, Yassen, That helped tremendously by doing exactly what I was looking for and saving me quite a bit of time doing it another way. Regarding your suggestion, if I output my list as json, would I set it as a

[ansible-project] Re: ansible 1.9.0.1 mistakenly reports Input file not found while using copy module

2015-04-23 Thread Yassen Damyanov
Nicolas, how about running the playbook with - for maximum verbosity and check the output? Y. -- 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] Re: wait for isn't waiting

2015-04-23 Thread Yassen Damyanov
Just a hint: the default host for the port version of wait_for is 127.0.0.1. If your service is bound to another interface (say, 192.168.5.5), then wait_for will not wait. Y. -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe

[ansible-project] Re: Ansible module for windows

2015-04-23 Thread Yassen Damyanov
On Thursday, April 23, 2015 at 9:43:04 PM UTC+3, Leonid Lee wrote: Is there any way to create modules using python to deploy packages on windows? Quoting from the manual (http://docs.ansible.com/intro_windows.html): For Windows, ansible modules are implemented in PowerShell. AFAIK, this is

[ansible-project] Re: Firewalls across multiple Linux Distros

2015-04-23 Thread Yassen Damyanov
This link works for me ATM: http://wiki.gema-soft.de/doku.php?id=it-administration:tools:ansible:ferm Why not give it a try? (Haven't tried it myself). I am new to ansible but I also know how chef works and AFAIK, with ansible you have to provide different sub-task sets for different distros;

[ansible-project] Re: Rendering a List in a Template

2015-04-23 Thread Yassen Damyanov
Your issue is that the variable is a python string and iterating over it gives back each character. This is probably not the best way to fix this, but should work: Creating a custom jinja2 filter that does eval(str_argument) will do. I managed to get one working as follows: cat

[ansible-project] Re: Rendering a List in a Template

2015-04-23 Thread Yassen Damyanov
On Thursday, April 23, 2015 at 11:37:19 PM UTC+3, Yassen Damyanov wrote: Your issue is that the variable is a python string and iterating over it gives back each character. This is probably not the best way to fix this, but should work: Creating a custom jinja2 filter that does eval

[ansible-project] Re: Authentication or permission failure.

2015-04-23 Thread Yassen Damyanov
On Tuesday, April 21, 2015 at 4:14:02 PM UTC+3, rrrki...@gmail.com wrote: I am getting this error when I ran the playbook for the remote node . Could you please let me know how to resolve this error ? 1. Quoting from openbsd netiquette: No one other than you has the information needed to

Re: [ansible-project] Can I gather facts without python on remote systems

2015-04-22 Thread Yassen Damyanov
On Wednesday, April 22, 2015 at 5:01:54 PM UTC+3, Brian Coca wrote: You cannot use the ansible built in facts as they are implemented in python but you can retrun your own custom ones, you just have to return a json structure that starts with { ansible_facts: ...} Or you can also