[ansible-project] Re: tags within included_tasks do not work?

2017-11-02 Thread coolcps
Figured this out, need to use import_tasks or tags don't work under it. Reading this documentation https://docs.ansible.com/ansible/2.4/playbooks_reuse.html#differences-between-static-and-dynamic and not sure if its a bug or meant to be that way. On Thursday, November 2, 2017 at 4:49:14 PM

Re: [ansible-project] yum module: removing groups failing

2017-11-02 Thread Steve McKuhr
On Tue Oct 31 2017 12:45:54 GMT-0700 (PDT) John Harmon wrote: > msg":"","rc":0,"results": > ["@Console internet tools is not installed", > "@General Purpose Desktop is not installed", > "@Graphical Administration Tools is not installed", > "@Graphics Creation Tools is

Re: [ansible-project] How to control `ignore_errors` with a variable

2017-11-02 Thread Brian Coca
It works for me, using this play: - hosts: localhost gather_facts: false vars: ignore: false tasks: - name: with var assert: that: - item < 2 ignore_errors: '{{ignore|bool}}' with_items: [1,2,3] I get the following output (note the 'ignoring' at the end:

Re: [ansible-project] use fetch module with wild card or best way to grab different name file from several hosts

2017-11-02 Thread Brian Coca
this explains it. http://docs.ansible.com/ansible/latest/playbooks_variables.html#registered-variables -- -- 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] tags within included_tasks do not work?

2017-11-02 Thread coolcps
In a playbook I have a file of tasks included, like so: - include_tasks: uplinks.yml And within that task file I have a task: - name: configure hosts ios_config: commands: - ip host {{ item['name'] }} {{ item['port'] }} {{ interfaces['mgmt']['ip'] }} with_items: "{{ host_entries

Re: [ansible-project] use fetch module with wild card or best way to grab different name file from several hosts

2017-11-02 Thread Kent Younge
So how would it look? > On Nov 2, 2017, at 6:15 PM, Brian Coca wrote: > > fetch does not support wildcards, register the data from find and use > that in loop in fetch > > -- > -- > Brian Coca > > -- > You received this message because you are subscribed to a

Re: [ansible-project] use fetch module with wild card or best way to grab different name file from several hosts

2017-11-02 Thread Brian Coca
fetch does not support wildcards, register the data from find and use that in loop in fetch -- -- 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

[ansible-project] Re: yum module: removing groups failing

2017-11-02 Thread John Harmon
anyone? -- 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] How to write cobbler.ini for multiple cobbler servers

2017-11-02 Thread Joanna Delaporte
I want to set up multiple cobbler servers' hosts in my cobbler.ini to use their inventory...how do I do that? -- 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

[ansible-project] Ansible expect module error

2017-11-02 Thread Richmond Fiko
Hello, I use Ansible 2.2.1.0 I try to use ansible expect module with a command: expect: command: set password of database responses: Admin Password for db_name: 'admin' Admin Password Confirmation: 'admin' I receive this error: fatal:

[ansible-project] Re: Fetch remote files, add them to local file

2017-11-02 Thread John Harmon
I ended up going this route: --- - hosts: "{{ host }}" vars: dest_dir: "/tmp/fetched" tasks: - name: Ensure destination directory exists file: dest: "{{ dest_dir }}" state: directory changed_when: false - name: Fetch files from remote server

[ansible-project] Error on with ansible expect module

2017-11-02 Thread Richmond Fiko
Hello, I try to use ansible expect module with a command: expect: command: set password of database responses: Admin Password for db_name: 'admin' Admin Password Confirmation: 'admin' I receive this error: fatal: [subdomain..com]: FAILED! =>

[ansible-project] How pass an array of dictionaries to my custom module elegantly?

2017-11-02 Thread ZillaYT
I'm not trying to re-invent the "replace" module that Ansible has. I'm trying to write a (my FIRST) custom module to encapsulate the repetitive Linux source build process, namely, - run ./configure $CONF_OPTS - run make - run make $TARGETS However, i have an outlying case where I have to modify

[ansible-project] Re: How to append to list vars

2017-11-02 Thread Arbab Nazar
Dick, something like this: http://blog.crisp.se/2016/10/20/maxwenzin/how-to-append-to-lists-in-ansible On Wednesday, November 1, 2017 at 4:45:27 PM UTC+5, Dick Visser wrote: > > Hi > > I have a few use cases where I define a list in group_vars/all.yml, > for instance a list of users: > > >

[ansible-project] Re: command module with squiggly braces not working.

2017-11-02 Thread Dan
My workaround that works: (not "dry" yet) but you get the idea. command: > > aws ec2 authorize-security-group-egress --group-id "{{ sg_id }}" > --region "{{ region }}" --profile "{{ profile }}" --ip-permissions > '[{"IpProtocol": "tcp", "FromPort": 443, "ToPort": 443,

[ansible-project] command module with squiggly braces not working.

2017-11-02 Thread Dan
ec2_group (as of Ansible 2.4) doesn't support usage of pl-x (prefix lists) typically employed by VPC endpoints. So I went down the rabbit hole of doing this via a command module. The command works on the prompt. How do I get this to work? ERROR! Syntax Error while loading YAML. The

[ansible-project] Fetch remote files, add them to local file

2017-11-02 Thread John Harmon
I have the following playbook but have 2 problems: 1. The contents of the file are garbled. Why is that? How can I clear it up? 2. How can I just grab the contents of the file only? {{file_contents.results.content}} complains --- - hosts: "{{ host }}" tasks: - name:

[ansible-project] use fetch module with wild card or best way to grab different name file from several hosts

2017-11-02 Thread Kent Younge
Hello, I have created a log file using ansible an have named the log file with the host name. I need to fetch that file from all my hosts and put it in a directory on the control server. However, it runs fine but does not copy the files over. Here is my cmds. - name: "Find

Re: [ansible-project] Re: Ansible (Problem install PHP)

2017-11-02 Thread Artur001
You right! I did not see message of Toshlo Kuratoml. четверг, 2 ноября 2017 г., 18:24:03 UTC+3 пользователь Werner Flamme написал: > > Artur001 [02.11.2017 16:02]: > > This package is present: > > > > ~/Загрузки$ php -v > > PHP 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Oct 27 2017

Re: [ansible-project] Unable to wildcard a template destination parameter

2017-11-02 Thread Tim Davidson
Thank you Kai, That worked. I'm obviously new to Ansible so I'm sure I'll have many more questions in the future. -Tim On Thursday, November 2, 2017 at 11:44:14 AM UTC-4, Kai Stian Olstad wrote: > > On 02. nov. 2017 14:44, Tim Davidson wrote: > > Hello, > > > > I'm trying to read some .csv

[ansible-project] fatal: [localhost]: FAILED! when installing IIS on Windows Server 2016 ec2

2017-11-02 Thread Akim Grudzitsky
I'm trying to install IIS server on the ec2 instance with Windows in AWS. But getting an error: fatal: [localhost]: FAILED! => { "changed": false, "failed": true, "module_stderr": "", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0 } Playbook: --- # Install

Re: [ansible-project] Unable to wildcard a template destination parameter

2017-11-02 Thread Kai Stian Olstad
On 02. nov. 2017 14:44, Tim Davidson wrote: > Hello, > > I'm trying to read some .csv files, then create config files for each of > the .csv files, based on a template. Reading the files is not a problem. > However, I can't seem to get the destination parameter to work. I would > like the output

Re: [ansible-project] Re: Ansible (Problem install PHP)

2017-11-02 Thread Werner Flamme
Artur001 [02.11.2017 16:02]: > This package is present: > > ~/Загрузки$ php -v > PHP 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Oct 27 2017 13:49:56 > ) ( NTS ) > Copyright (c) 1997-2017 The PHP Group > Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies > with Zend OPcache

[ansible-project] Re: Ansible (Problem install PHP)

2017-11-02 Thread Artur001
This package is present: ~/Загрузки$ php -v PHP 7.1.11-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Oct 27 2017 13:49:56 ) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.11-1+ubuntu16.04.1+deb.sury.org+1,

[ansible-project] Unable to wildcard a template destination parameter

2017-11-02 Thread Tim Davidson
Hello, I'm trying to read some .csv files, then create config files for each of the .csv files, based on a template. Reading the files is not a problem. However, I can't seem to get the destination parameter to work. I would like the output file to be the name of the original .csv file with a

Re: [ansible-project] pytest arugment error

2017-11-02 Thread Toshio Kuratomi
Could you go through your shells' history and reporter precisely which steps from that page you have performed? It looks like you've missed a step or two. On Nov 2, 2017 5:58 AM, "Jae Kim" wrote: > Hi > > > > Following the command in this manual > >

Re: [ansible-project] pytest error message

2017-11-02 Thread Toshio Kuratomi
How are you arranging for ansible to be in your PYTHONPATH? -Toshio On Nov 2, 2017 5:58 AM, "Jae Kim" wrote: > Hi > > > > When I run the following command > > > > pytest -r a -fulltrace --color yest my_new_test_module.py > > > > I get the following error message. > > > >

[ansible-project] pytest arugment error

2017-11-02 Thread Jae Kim
Hi Following the command in this manual http://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html When I run the following command pytest -r a --cov=. --cov-report=html --fulltrace --color yes test/units/modules/.../test/my_new_test_module.py the follow

[ansible-project] pytest error message

2017-11-02 Thread Jae Kim
Hi When I run the following command pytest -r a -fulltrace --color yest my_new_test_module.py I get the following error message. = test session starts == platform linux -- Python 3.4.5, pytest-3.2.3, py-1.4.34, pluggy-0.4.0

Re: [ansible-project] Re: Ansible (Problem install PHP)

2017-11-02 Thread Mehul Ved
I believe the package you're looking for is php-opcache. It's there in the ppa too. opcache is the object caching module in php - http://php.net/manual/en/intro.opcache.php On Thu, Nov 2, 2017 at 1:12 PM, Artur001 wrote: > Thank you. > But problem stays. > > TASK [php :

Re: [ansible-project] Ansible (Problem install PHP)

2017-11-02 Thread Toshio Kuratomi
There's no package named php7.1-apcache in that ppa. correct the spelling. Packages in that ppa which start with php7.1 are here http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/p/php7.1/ -Toshio On Nov 1, 2017 12:37 PM, "Artur001" wrote: My main.yml Введи- name:

[ansible-project] Get user details

2017-11-02 Thread Ravikumar Wagh
Is there any way to get available users in system or an spcific user details. -- 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] Ansible Unit Test installation error

2017-11-02 Thread Jae Kim
When I run the following command pip3 install -r ./test/runner/requirements/units.txt The softwares get installed but in the setup steps I get the following error failed with error code 1 in /tmp/pip-build- /pycrypto Also is there a way to skip already successfully run steps and jump to the

[ansible-project] Re: Ansible (Problem install PHP)

2017-11-02 Thread Artur001
my project Project -- 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] Ansible, Gitlab, Chocolatey & Telegraf - Master Playbook / Windows setup

2017-11-02 Thread 'Adam Brush' via Ansible Project
Hi, I've done another noobie guide for a basic Master Playbook setup for a mainly windows based setup. It details: - Creating a folder structure (C:\Ansible\Repo) - Pausinh - Download some files from out gitlab using win_get_url - Run some powershell scripts (install chocolatey and

[ansible-project] Re: Ansible (Problem install PHP)

2017-11-02 Thread Artur001
Thank you. But problem stays. TASK [php : install php requirements for joomla] *** failed: [joomla] (item=[u'php7.1-json', u'php7.1-xml', u'php7.1-mbstring', u 'php7.1-intl', u'php7.1-apache', u'php7.1-mysql', u'php7.1-pgsql']) => { "changed": false, "failed": true,

[ansible-project] How to control `ignore_errors` with a variable

2017-11-02 Thread guenhter
Hi, I already opened an issue for my question but I was advised to come here first. The detailed description is available under https://github.com/ansible/ansible/issues/32384 To sum it up: I cannot manage to make the `ignore_errors` work with a variable. When I use a hardcoded boolean it