[ansible-project] Re: How to retrieve a specific result from multiple command registered to a variable

2016-03-18 Thread Uditha Desilva
Faced with a similar issue, I initially wrote a script to which I could pass all my parameters to be operated on, and then a custom module :-) On Thursday, 17 March 2016 23:49:50 UTC, Arthur Reyes wrote: > > I have a series of commands registered to the same var > > - shell: ls -alh'{{ item }}'

[ansible-project] How to force creating a new ssh connection

2016-03-18 Thread jan . warchol
Hello, by default Ansible uses SSH's ControlPersist feature to reuse one ssh connection for running multiple tasks. This is very nice and helpful. However, there is one situation when this is a problem: when I change sshd configuration, I want Ansible to start a new connection so that it

Re: [ansible-project] Change of behaviour of delagate_to between Ansible 1.9.4 and 2.0.1.0

2016-03-18 Thread Brian Coca
Check against current devel, we just fixed an issue with delegation connection vars not being set correctly. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

[ansible-project] Re: Proposal for fixing playbooks with dynamic include problems

2016-03-18 Thread Phonthip Namkaew
> > Hi > I understand that task-level includes are completely dynamic in 2.0 and therefore the following command / option ( --list-tasks ) can not list tasks in the task-level includes at parse time present in playbookfoo.yml : ansible-playbook playbookfoo.yml --list-tasks However, I feel

[ansible-project] My first "role" isn't running

2016-03-18 Thread Gilberto Valentin
I am creating a role to install some packages and then join a system to a domain controller. However, when I run my playbook, it comes back saying *ERROR! ERROR! 'test' is undefined.* Here is how I am running my playbook: ansible-playbook -i server_hosts app_install_main.yml I don't see

Re: [ansible-project] How to retrieve a specific result from multiple command registered to a variable

2016-03-18 Thread Brian Coca
that is actually a jinja2 issue, 'equalto' would have been available by just upgrading jinja2 itself. -- Brian Coca -- 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,

[ansible-project] My first "role" isn't running

2016-03-18 Thread Arthur Reyes
Just a thought. Did you export ANSIBLE_INVENTORY? And is it equal to the path and name of your inventory file? -- 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

Re: [ansible-project] Re: My first "role" isn't running

2016-03-18 Thread Uditha Desilva
That "when" should be checking for "testservers" (plural). On Fri, 18 Mar 2016, 23:59 Gilberto Valentin, wrote: > Hi Mike, > > When I say "moved it up one level", I meant I took my hosts file out of > the roles directory and moved it up one level out of there. > > Now,

[ansible-project] Re: OpenStack Dynamic Inventory Question

2016-03-18 Thread Monty Taylor
There are two things you should try to help us track down the problem, if you don't mind. First of all: openstack server list (python-openstackclient also uses occ, so that should let us know that the config is working right) If that works and you see the servers, my _hunch_ is that ansible

[ansible-project] Re: Check existence and state of a service on windows machine using win_service

2016-03-18 Thread 'J Hawkesworth' via Ansible Project
I suggest you add a task, before your win_service task that installs the service if it is not yet installed. Depending on what the service is, you might be able to use win_package to install it. If it is already installed, there is not much to loose by running the win_package task a second

Re: [ansible-project] Sample skeleton for Ansible module written in Perl -- how should I contribute?

2016-03-18 Thread Brian Coca
I don't know if you are aware, but there is already a Perl 'module helper' http://search.cpan.org/~mramberg/AnsibleModule-0.3/lib/AnsibleModule.pm We don't host Perl/Ruby/shell or other module helpers in the Ansible project itself, but we would be happy to reference such in our docs. --

[ansible-project] When conditional can be used with variables??

2016-03-18 Thread NEW HOMIE
Hello there~ Is this possible using when conditional with variables? For instance, I use two kind of was (Jboss, Weblogic) I create for checking process id some yml files like under line *check.yml* - shell: ps -ef | grep '{{ nodename }}' | grep XX | awk {'print $2'} register: pid

[ansible-project] Passing environment variable set in group_vars to lookup pluging

2016-03-18 Thread Samnang Sen
I export ANSIBLE_CONSUL_URL in order for the Consul lookup pluging to search against a remote server. I'm not able to set this environment variable within my playbook. It still defaults to localhost. Is it not possible? # group_vars/all consul_url_env: ANSIBLE_CONSUL_URL:

[ansible-project] module lineinfile not found in configured module paths. Additionally, core modules are missing. If this is a checkout, run 'git submodule update --init --recursive' to correct this

2016-03-18 Thread Krishna Kanth
Hi Ansible Experts, I am facing the error in the subject line, when i tried to access a file and add a line to end of the file using lineinfile module. For some reason it unables to find the module or something, tried re-installing ansible different ways , without any luck. All the post on

[ansible-project] But in iptables module?

2016-03-18 Thread Joshua J. Kugler
I'm trying to use the iptables module, and I *think* I'm hitting a bug. Wanted a sanity check before I open a bug report. This is Ansible 2.0.0.2. The action looks like this: - name: Update IPtables rules iptables: chain: INPUT match: state ctstate:

Re: [ansible-project] Re: ansible-pull git failures on initial clone and when repo changes.

2016-03-18 Thread Govindaraj Venkatesan
Hi All, I am facing the same issue as "no hosts matched" and the ansible-pull is taking only localhost. It is not able to see any of my hosts. Here is how i am using the command ansible-pull -U g...@github.com:XPlat/caps-sps.git -d /home/gvenka008c/caps-sps jenkins_mesos_icinga.yml -i

[ansible-project] Backup file naming convention -- MyFile.2016-03-10@15:48:16~

2016-03-18 Thread johhue
Hello, Is there a way to update the naming convention of the backup files: I see them being written as: MyFile.*2016-03-10@15:48:16~* These files are placed by the template core module when backup=yes is given. Is this naming convention configurable? Would rather have like

Re: [ansible-project] sudo permissions with apt module

2016-03-18 Thread Brian Coca
ansible is not using those commands and will not work with restricted sudo in that way, it needs full sudo to accomplish these tasks. Most of the work of the apt module is using the apt-python API. -- Brian Coca -- You received this message because you are subscribed to the Google

[ansible-project] Re: when: state is present from variable dict hash list

2016-03-18 Thread Uditha Desilva
You may have a typo or 2 in your sample case. This works fine for me: $ cat tst.yml --- - hosts: localhost vars: staff: - { netid: user001, uid: 12345, comment: "Chris Short", state: present } - { netid: user002, uid: 12346, comment: "Bob Jones", state: absent }

[ansible-project] Re: My first "role" isn't running

2016-03-18 Thread Mike Biancaniello
I think your tree should look more like this. Also notice the change of tasks/app_install_task.yml to tasks/main.yml ~/git/ansible$ tree . └── project1 ├── server_hosts ├── roles │ └── app_install │ ├── README.md │ ├── defaults │ │ └── main.yml │

[ansible-project] Re: Backup file naming convention -- MyFile.2016-03-10@15:48:16~

2016-03-18 Thread johhue
The main reason I want to tweak is so when I do audits and such they will stand out more as being a backup file. On Friday, March 18, 2016 at 7:20:26 PM UTC-7, johhue wrote: > > Hello, > > Is there a way to update the naming convention of the backup files: > > I see them being written as:

[ansible-project] Re: My first "role" isn't running

2016-03-18 Thread Uditha Desilva
I agree with Mike's suggestion regarding changing that conditional to when: "'testservers' in group_names" -- that's exactly how I handle special cases like DMZ hosts. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from

[ansible-project] when: state is present from variable dict hash list

2016-03-18 Thread 'Chris Short' via Ansible Project
I have the following defined in group_vars and I'm trying to run a task when the state is defined as present and the syntax is baffling me: staff: - { netid: user001, uid: 12345, comment: "Chris Short", state: present } - { netid: user002, uid: 12346, comment: "Bob Jones", state: absent }

[ansible-project] Re: ansible-pull support for git repo containing submodules?

2016-03-18 Thread Julian Barnett
Haven't heard anything back in a few days on this. Should I submit a feature request? On Tuesday, March 15, 2016 at 5:14:22 PM UTC-7, Julian Barnett wrote: > > I can't seem to figure out if this is supported (if so what am I missing?) > or if this just hasn't come up yet anywhere. I haven't

[ansible-project] Re: Check existence and state of a service on windows machine using win_service

2016-03-18 Thread ishan jain
Both get-service and sc.exe returns textual results. I will have to match strings to check if service exists and its state and i never like to base my conditions on pattern matching. The best solution i could thing of is to go with win_service and define a failed_when situation along with. At

[ansible-project] Change of behaviour of delagate_to between Ansible 1.9.4 and 2.0.1.0

2016-03-18 Thread Jon B
Apologies for the previous blank post. I have had a playbook in production for about 9 months that carries out a rolling update or our application across a number of servers by using a pre_tasks section that removes a server from load balancers before deploying updated code and then adding

[ansible-project] Re: How to force creating a new ssh connection

2016-03-18 Thread Arthur Reyes
Take a look at asynchronous actions: http://docs.ansible.com/ansible/playbooks_async.html On Friday, March 18, 2016 at 12:39:28 PM UTC-5, jan.w...@codilime.com wrote: > > Hello, > > by default Ansible uses SSH's ControlPersist feature to reuse one ssh > connection for running multiple tasks.

[ansible-project] Re: My first "role" isn't running

2016-03-18 Thread Gilberto Valentin
Hi Mike, When I say "moved it up one level", I meant I took my hosts file out of the roles directory and moved it up one level out of there. Now, back to your suggestions. For your first point, I am not sure I follow. For example, you said to run my play (I understand this as task) with

Re: [ansible-project] Backup file naming convention -- MyFile.2016-03-10@15:48:16~

2016-03-18 Thread Brian Coca
That is not currently possible, but put in a 'feature idea' in github. -- Brian Coca -- 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

Re: [ansible-project] Backup file naming convention -- MyFile.2016-03-10@15:48:16~

2016-03-18 Thread johhue
Thanks! Will do On Friday, March 18, 2016 at 7:21:28 PM UTC-7, Brian Coca wrote: > > That is not currently possible, but put in a 'feature idea' in github. > > > -- > Brian Coca > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To