[ansible-project] Windows server luns path checks availability.

2019-04-09 Thread srinivas a
Hi All, I am seeking for an help from the experts in this forum, if someone can help me and suggest on my task. I would like to create a play book for windows servers (2008 R2 standard/2012 Standard/ 2016 Standard) that will help to see all the presented luns are available or visible for both

Re: [ansible-project] How to capture/filter stdout_lines

2019-04-09 Thread Sebastian Meyer
On 10.04.19 04:38, Saranya N wrote: > Stdout_lines that I get contains strings , json in different lines. > > I want to capture the last line and copy those contents to a a new Json file. > > How do I capture the last line from the registered variable. > > I tried this and it didn't work. > > "

Re: [ansible-project] help me - error: Filespec must match the canonical format: [[namespace/]pod:]file/path

2019-04-09 Thread vinoth kumar
On Tue, 9 Apr 2019 at 8:12 AM, Balaji wrote: > > Hello All, > > Need your help on below issue. > > I am trying to run kubernetes command on a remote host using ansible. > > This command works when directly run on a remote host. > > ==> kubectl cp /etc/passwd > bus-service/ssh-jumphost-6954f

Re: [ansible-project] win_copy azure ansible module not working

2019-04-09 Thread vinoth kumar
Hi , Error says in dest. Can you try to put in any other destination with absolute path ? On Tue, 9 Apr 2019 at 3:49 PM, gottumukkala srija wrote: > Hi Team, > > We are trying to automate the installation of tools in azure using > ansible. VM spin up is successful and we are trying to invoke the

[ansible-project] How to capture/filter stdout_lines

2019-04-09 Thread Saranya N
To elaborate I don't want to use indeed value like sdout_lines[5] which works but is there a way to choose it by default ? -- 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

[ansible-project] How to capture/filter stdout_lines

2019-04-09 Thread Saranya N
Stdout_lines that I get contains strings , json in different lines. I want to capture the last line and copy those contents to a a new Json file. How do I capture the last line from the registered variable. I tried this and it didn't work. "{{ Regvar.stdout_lines | last }}" -- You received th

Re: [ansible-project] Set jinja2_native at play level?

2019-04-09 Thread Dick Visser
On Tue, 9 Apr 2019 at 20:08, Brian Coca wrote: > > use this lookup instead > https://docs.ansible.com/ansible/latest/plugins/lookup/config.html, it > will handle 'actual configuration value' instead of relying on the > specific source used. exactly what i'm looking for, thx! -- Dick Visser Tru

Re: [ansible-project] pip install docker-compose

2019-04-09 Thread Andrew Meyer
Root is using the same version. Also I stopped doing that as root. [ameyer@awx01 ~]$ python Python 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import compose >>> exit() [ameyer

Re: [ansible-project] man pages showing keywords?

2019-04-09 Thread Brian Coca
no, https://docs.ansible.com/ansible/latest/reference_appendices/playbooks_keywords.html is only reference. -- -- 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

Re: [ansible-project] pip install docker-compose

2019-04-09 Thread Sebastian Meyer
On 09.04.19 22:51, Andrew Meyer wrote: > [ameyer@awx01 ~]$ pip --version > pip 19.0.3 from /usr/lib/python2.7/site-packages/pip (python 2.7) > [ameyer@awx01 ~]$ ansible localhost -m setup|grep ansible_python_version > [WARNING]: provided hosts list is empty, only localhost is available. Note > th

Re: [ansible-project] pip install docker-compose

2019-04-09 Thread Andrew Meyer
[ameyer@awx01 ~]$ pip --version pip 19.0.3 from /usr/lib/python2.7/site-packages/pip (python 2.7) [ameyer@awx01 ~]$ ansible localhost -m setup|grep ansible_python_version [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

Re: [ansible-project] pip install docker-compose

2019-04-09 Thread Sebastian Meyer
Hi Andrew, what's the output of pip --version and ansible localhost -m setup | grep ansible_python_version Regards Sebastian On 09.04.19 21:26, Andrew Meyer wrote: > I seem to be having an issue when trying to run this playbook for building > AWX. > > When I go to run the ansible playbook I

[ansible-project] Ansible having an issue when we pass dictionary as extra variable or define in the variable file

2019-04-09 Thread Krishna G
*Local Machine:* Ansible version: 2.4.1.0 python version = 2.7.10 *Remote Redhat Machine:* Ansible version: 2.7.7 Python: 2.7.5 i have ansible running on my local machine(MAC), when i pass extra varibale as map it's reading all the values in the map and giving proper results. If i run same ta

Re: [ansible-project] pip install docker-compose

2019-04-09 Thread Andrew Meyer
Added the --user to the pip install and that worked. But still getting this: TASK [geerlingguy.awx : Run the AWX installation playbook.] **

Re: [ansible-project] pip install docker-compose

2019-04-09 Thread Jonathan Lozada De La Matta
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/docker/__init__.py' Consider using the `--user` option or check the permissions. you can do this with --user but, again I prefer to use a virtualenv. On Tue, Apr 9, 2019 at 3:47

Re: [ansible-project] pip install docker-compose

2019-04-09 Thread Andrew Meyer
pip install docker-compose==1.22 DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Requirement already satisfied: docker-compose==1.22

Re: [ansible-project] pip install docker-compose

2019-04-09 Thread Jonathan Lozada De La Matta
that might explain why. You are installing the package under root and you might be running as yourself. I suggest you use virtualenv and install pip using a virtualenv. On Tue, Apr 9, 2019 at 3:41 PM Andrew Meyer wrote: > For pip install I did: > sudo pip install docker-compose==1.22.0 > > Playb

Re: [ansible-project] pip install docker-compose

2019-04-09 Thread Andrew Meyer
For pip install I did: sudo pip install docker-compose==1.22.0 Playbook https://github.com/geerlingguy/ansible-role-awx Please remember to reply to all if there are multiple recipients. Andrew Meyer andrewm...@gmail.com ame...@tsg2.com 314-266-4837 On Tue, Apr 9, 2019 at 2:30 PM Jonathan Loza

Re: [ansible-project] pip install docker-compose

2019-04-09 Thread Jonathan Lozada De La Matta
how did you pip install ? and can we see the playbook? On Tue, Apr 9, 2019 at 3:26 PM Andrew Meyer wrote: > I seem to be having an issue when trying to run this playbook for building > AWX. > > When I go to run the ansible playbook I get the following error: > > "ok: [localhost] => (item

[ansible-project] pip install docker-compose

2019-04-09 Thread Andrew Meyer
I seem to be having an issue when trying to run this playbook for building AWX. When I go to run the ansible playbook I get the following error: "ok: [localhost] => (item=environment.sh)", "ok: [localhost] => (item=credentials.py)", "ok: [localhost] => (item=docker-comp

Re: [ansible-project] Set jinja2_native at play level?

2019-04-09 Thread Brian Coca
use this lookup instead https://docs.ansible.com/ansible/latest/plugins/lookup/config.html, it will handle 'actual configuration value' instead of relying on the specific source used. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansibl

[ansible-project] Ansible having an issue while passing extra variable in map.

2019-04-09 Thread Krishna G
*Local Machine:* Ansible version: 2.4.1.0 python version = 2.7.10 *Remote Redhat Machine:* Ansible version: 2.7.7 Python: 2.7.5 i have ansible running on my local machine(MAC), when i pass extra varibale as map it's reading all the values in the map and giving proper results. If i run same ta

Re: [ansible-project] Set jinja2_native at play level?

2019-04-09 Thread Dick Visser
On Tue, 9 Apr 2019 at 15:54, Brian Coca wrote: > > not currently, but you can do so via environment variable in the > command line when executing new/old playbooks > > ANSIBLE_JINJA2_NATIVE=1 ansible-playbook newplay.yml Thanks, this works. However, the playbook also "works" without setting this,

Re: [ansible-project] Re: Set ansible_python_interpreter at Task level?

2019-04-09 Thread Brian Coca
`vars` is a 'task keyword' different from module options, the problem was that you mixed both. This is an indentation issue, not order (keywords can appear in any order). -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

Re: [ansible-project] Installing packages from variable

2019-04-09 Thread Brian Coca
@Kai that is incorrect, apt uses 'list' type for name/package/pkg which accepts both yaml lists AND comma separated strings The problem is probably what the literal error message returns 'no package named krb5-user' be aware that 'apt command line' normally does a 'similar package name search' w

Re: [ansible-project] Re: Limiting hosts when including playbooks

2019-04-09 Thread Brian Coca
create the groups the imported playbook uses in a group_by in a preceding play -- 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 ansibl

[ansible-project] Create custom facts in windows

2019-04-09 Thread Rafael Tomelin
Hi, I need create custom facts in windows, but where directory create in windows for customs facts? How set path custom facts in windows in ansible? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop re

Re: [ansible-project] Set jinja2_native at play level?

2019-04-09 Thread Brian Coca
not currently, but you can do so via environment variable in the command line when executing new/old playbooks ANSIBLE_JINJA2_NATIVE=1 ansible-playbook newplay.yml -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsu

Re: [ansible-project] Re: Variable substitution in meta/main.yml

2019-04-09 Thread Brian Coca
There is no templating in meta/main.yml, so no variable substitution. The only thing that 'works' is defining vars based on a template, since they are 'lazily evaluated' later on use inside the dependent role. -- -- Brian Coca -- You received this message because you are subscribed to

Re: [ansible-project] The non-existence of local facts means Ansible cannot check the existence of a local fact

2019-04-09 Thread Brian Coca
or a more flexible conditional: when: "'my_fact' in ansible_local and ansible_local['my_fact']['default']['name'] is defined" FYI, in newer version of Ansilbe, `ansible_local` is always defined, even if empty, so no need to use default on it -- -- Brian Coca -- You received this messa

[ansible-project] win_copy azure ansible module not working

2019-04-09 Thread gottumukkala srija
Hi Team, We are trying to automate the installation of tools in azure using ansible. VM spin up is successful and we are trying to invoke the powershell script(code for tools installation) so the files has to be installed on the server. Tried number of ways using win_copy command for copying

Re: [ansible-project] Ansible modules copy/template errors for Linux 5 hosts using python26 ,python binding libselinux-python needed

2019-04-09 Thread iamlightsocialxen
Thanks Sebastian, one of the best replies I have received from community . Keep up the good work. On Wednesday, March 27, 2019 at 4:10:09 PM UTC+8, Sebastian Meyer wrote: > > Hi Prakash, > > you have three options here: > > 1) disable selinux in /etc/selinux/config > > Then you don't need lib