[ansible-project] Re: Ansible-everyday

2017-02-03 Thread Alexey Vazhnov
You choose strange copyright/license. May be you should use one of standard open source licenses (Apache, MIT, cc0, …)? On Wednesday, January 25, 2017 at 4:31:35 AM UTC+5, Ian McWilliam wrote: > > Hi all, > > I have recently released on a project on GitHub called ansible-everyday. > > https://git

[ansible-project] Re: apt module behavior

2017-01-17 Thread Alexey Vazhnov
Ansible set DEBIAN_FRONTEND=noninteractive, so no any dialog. On Wednesday, January 18, 2017 at 2:06:34 AM UTC+5, Igor Schaefer wrote: > > Hello, colleagues > > Sure, all you know the situation, when you install a new version of > package and you get a dialog window with warnings like "use existi

[ansible-project] Re: Install tomcat server on an ec2 instance

2017-01-10 Thread Alexey Vazhnov
Choose VPC and security group — this is question not for Ansible, but for your AWS architecture. If you don't know, then I recommend you create VPC and separate security group. On Wednesday, January 4, 2017 at 11:01:49 AM UTC+5, Chethan Aravind T S wrote: > > Hi, > I want to install tomca

[ansible-project] Re: Setup Ansible server to manage several AWS Accounts using dynamic inventory?

2017-01-10 Thread Alexey Vazhnov
Looks good. I don't have much experience with multiple AWS accounts. I think you can create 20 directories for independent inventory, for example: 'inventory/acc01/', 'inventory/acc02/', e.t.c. Then copy dynamic inventory script into this directories. And you can create static inventory files in

[ansible-project] Re: Not able ping instances using dynamic inventory

2016-09-07 Thread Alexey Vazhnov
What do you see when start ec2.py just as python application? If you see your instances, may be you need to use: inventory = /etc/ansible/inventory/ On Wednesday, September 7, 2016 at 2:09:05 AM UTC+5, chall...@gmail.com wrote: > > I have downloaded ec2.py and ec2.ini files and placed them unde

[ansible-project] Re: dynamic inventory jinja2 template help

2016-08-05 Thread Alexey Vazhnov
Try something like this https://github.com/f500/ansible-dumpall to understand what you have. On Wednesday, August 3, 2016 at 10:51:57 PM UTC+5, Bryan Pearson wrote: > > I have nodes in AWS and I'd like to use the dynamic inventory to create a > template. Currently I cant get the facts from all

[ansible-project] Re: Ansible Pull mode

2016-07-28 Thread Alexey Vazhnov
This might be interesting for large projects. On Wednesday, July 27, 2016 at 3:37:34 AM UTC+5, knowshan wrote: > > > I am looking for suggestions for implementing Ansible pull model. The pull > mode is essential for bootstrapping new systems and auto-scaling not > launched by Ansible. > > I've

[ansible-project] Re: Module ping: One host fails with "SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh"

2016-07-19 Thread Alexey Vazhnov
Did ansible use login root for SSH connection? I think Ansible try to login with your username, not root. Use «ansible_ssh_user» in inventory file, or «--user» in ansible arguments, or «User» in ~/.ssh/config. On Friday, July 15, 2016 at 12:55:01 PM UTC+5, Jörg Kastning wrote: > > Hello there, >

[ansible-project] Re: AWS dynamic inventory and filter out unreachable host

2016-07-19 Thread Alexey Vazhnov
I know only «all_instances = False» (by default) in ec2.ini, to exclude stopped. Unreachable hosts will be skipped by Ansible, but error messages will be displayed. On Tuesday, July 19, 2016 at 3:59:48 PM UTC+5, Anthony Cheng wrote: > > I want to use the ec2_facts module to gather info, e.g. > >

[ansible-project] Re: ec2.py and the incredibly no good bad corporate overlords policies.

2016-06-28 Thread Alexey Vazhnov
Check «DNS Hostnames=Yes» in your VPC settings (not in Ansible). On Friday, June 24, 2016 at 10:35:19 PM UTC+5, Joe Garcia wrote: > > Hey All, > > Our corporate overlords have deemed it prudent to not allow IP addresses > to go out through our proxy. So we cannot ssh to an IP address and have to

[ansible-project] Re: Unreachable error

2016-06-15 Thread Alexey Vazhnov
First, check SSH connection. In your case: ssh 127.0.0.1 On Thursday, June 16, 2016 at 5:28:39 AM UTC+5, navdeep uniyal wrote: > > Hi all, > > I am new to ansible. I have been learning ansible using ad hoc commands as > well as ansible playbooks. Things were running fine until I started getting

[ansible-project] Re: Disable Handlers?

2016-06-08 Thread Alexey Vazhnov
I know only using «when» to disable the handlers. On Tuesday, June 7, 2016 at 6:26:08 AM UTC+5, ja...@blendlabs.com wrote: > > Any one know a good way to disable all handlers in a role w/o putting > conditionals on each of the handlers/tasks? > -- You received this message because you are sub

[ansible-project] Re: Group ec2 instances and local machines together

2016-05-20 Thread Alexey Vazhnov
Yes, just put your static inventory and EC2 dynamic inventory script in one folder. On Friday, May 20, 2016 at 5:45:13 PM UTC+5, Alex Braun wrote: > > I want to run a playbook with some group_vars on some Amazon EC2 instances > and on some local machines. Is there some way that I can group EC2

[ansible-project] Re: Same host in inventory twice with two different ports, not working

2016-05-04 Thread Alexey Vazhnov
I think what better solution for storing SSH settings (hostname, port, username, proxycommand, identityfile …) is ~/.ssh/config. On Friday, April 29, 2016 at 4:11:48 AM UTC+5, John Gateley wrote: > > Hello, > > I have an inventory file with the same host twice, once using ssh on port > 22, once

[ansible-project] Re: dynamic inventory - hostname or ip address

2016-05-04 Thread Alexey Vazhnov
You can use in ec2.ini: tag_destination_variable = Name On Friday, April 29, 2016 at 9:47:24 AM UTC+5, Bill WANG wrote: > > Hi all, > > I got dynamic inventory for ec2 instances via ansible. But the host in > export are all IP addresses. > > > In ec2.ini > > vpc_destination_variable = private_i

[ansible-project] Re: New Modules Report, 12-Apr-2016

2016-04-13 Thread Alexey Vazhnov
Thanks for your digests! On Wednesday, April 13, 2016 at 2:38:08 AM UTC+5, Greg DeKoenigsberg wrote: > > There are currently 150 modules waiting for inclusion in Ansible > Extras. One of them might be useful to you! > > New modules this week: > > InfluxDB database module > https://github.com/a

[ansible-project] Re: Dealing with inconsistencies after failed runs

2016-03-09 Thread Alexey Vazhnov
I think you want special handlers, that started directly after task, not at the the end of all tasks. But I don't know about this handlers in Ansible. You can use "register: var1" and "when: var1.changed" in next task. On Wednesday, March 9, 2016 at 2:09:52 PM UTC+5, Branko Majic wrote: > > Hello

[ansible-project] Re: using the results of a task include in a until loop

2016-03-09 Thread Alexey Vazhnov
Try to use: - name: Loop until status returns successful include: tasks/check_xxx_status.yml until: driver_status == 'RUNNING' retries: 10 delay: 10 register: driver_reg - debug: var=driver_reg - name: Next task … when: driver_reg.changed On Wednesday, March 9, 2016 at 3:41:38

Re: [ansible-project] Ansible forces me break PEP8 when writing modules

2016-03-04 Thread Alexey Vazhnov
And this is bad. This can alienate new developers. I like Python because it have formatting standards. When I open Ansible source files in my VIM with installed vim-syntastic, I see too much bad formatting. And I begin formatting fixing at first, instead of writing/fixing code. Please, let us po

[ansible-project] Re: Downgrading apt packages safely

2016-03-02 Thread Alexey Vazhnov
Your playbook gave me an error too: fatal: [localhost]: FAILED! => {"cache_update_time": 0, "cache_updated": false, "changed": false, "failed": true, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-downgrade\" install 'haproxy=1.4.24-2'' failed: E: There are problems and -y was used

[ansible-project] Re: get ec2 instance id after ec2 creation

2016-02-19 Thread Alexey Vazhnov
It is strange, look like all must to work. I don't understand why you received "undefined attribute". Try to add after first task: - debug: var=ec2 On Friday, February 19, 2016 at 5:05:24 AM UTC+5, Colin Byrne wrote: > > Hey, so I feel like I am following all the tutorials but I can't seem

[ansible-project] Re: Ansible Role dependencies After Role

2016-02-17 Thread Alexey Vazhnov
May be the better way for you is make one playbook for non-idempotent installer role and one for idempotent configuring. On Wednesday, February 3, 2016 at 5:25:35 PM UTC+5, ProfHase wrote: > > Hello, > > how do I declare a role dependency which is executed after the role, e.g. : > > After every e

[ansible-project] Re: Ansible Role dependencies After Role

2016-02-17 Thread Alexey Vazhnov
Ansible tasks and roles must be idempotent. If your role can override something, I think it's the wrong way. On Wednesday, February 3, 2016 at 5:25:35 PM UTC+5, ProfHase wrote: > > Hello, > > how do I declare a role dependency which is executed after the role, e.g. : > > After every execution of

[ansible-project] Re: Merging inventories?

2016-02-15 Thread Alexey Vazhnov
Try to use: ansible-playbook -i inventories because Ansible can use directories. You also can use symlinks for more complicated cases. On Saturday, February 13, 2016 at 10:52:08 AM UTC+5, Nico K. wrote: > > Hi, > > When one has multiple inventories like: > > inventories/a/hosts > inventories/b/h

[ansible-project] Re: activate all ec2 instance store (ephemeral drive)

2016-02-15 Thread Alexey Vazhnov
Just select your EC2 instance type, and Amazon automatically attach ephemeral disks if they available for your instance type. On Saturday, February 13, 2016 at 3:17:46 AM UTC+5, Roy wrote: > > Hi, > >I am trying to automate ec2 instance launch launch and mount available > all instance store

[ansible-project] Re: How to run a specific script of a role in playbook?

2016-02-05 Thread Alexey Vazhnov
Did you try to google it? For example: https://stackoverflow.com/questions/23945201/how-to-run-only-one-task-in-ansible-playbook On Friday, February 5, 2016 at 11:52:19 AM UTC+5, ju wrote: > > Hi, > > How could I run just a specified script rather than the whole role? > Appreciate your advice.

[ansible-project] Re: Some important features in Ansible that I'd like to see ('creates', 'removes', 'run_once_by')

2016-01-19 Thread Alexey Vazhnov
Moved to «Ansible Development» https://groups.google.com/d/msg/ansible-devel/kYUi8fvKZMI/vRdYrKYbFwAJ On Wednesday, December 23, 2015 at 9:50:07 AM UTC+5, Alexey Vazhnov wrote: > > Hi! > > I want to suggest a few major and valuable, as I see it, features and > invite commu

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

2015-12-30 Thread Alexey Vazhnov
You can place your common variables in group_vars/all/. Did you read this http://docs.ansible.com/ansible/playbooks_variables.html ? On Wednesday, December 30, 2015 at 4:48:06 PM UTC+5, Yassen Damyanov wrote: > > Guys, > > Could you suggest a way to handle data common to a set of roles, e.g. the

[ansible-project] Re: ec2.py and ansible_ssh_host

2015-12-24 Thread Alexey Vazhnov
I still waiting when my first pull request https://github.com/ansible/ansible/pull/12190 will be approved, to send next changes. On Thursday, December 24, 2015 at 9:43:07 AM UTC+5, Alexey Vazhnov wrote: > > You can use my version of ec2.py > https://github.co

[ansible-project] Re: ec2.py and ansible_ssh_host

2015-12-23 Thread Alexey Vazhnov
You can use my version of ec2.py https://github.com/vazhnov/fork_ansible_contrib_inventory_ec2.py before I pull this changes to mainstream. On Thursday, December 24, 2015 at 2:13:38 AM UTC+5, Josh Smift wrote: > > We use the ec2.py inventory plugin, and > > vpc_destination_variable = Name >

[ansible-project] Some important features in Ansible that I'd like to see ('creates', 'removes', 'run_once_by')

2015-12-22 Thread Alexey Vazhnov
Hi! I want to suggest a few major and valuable, as I see it, features and invite community to discuss: * Add 'creates' and 'removes' parameters for any task, not only for modules like 'shell', as it works now. * Add 'run_once_by' parameter for running task once for each unique value of 'run_on

[ansible-project] Re: Pass vault variables into large config vault file.

2015-12-21 Thread Alexey Vazhnov
No, I suggest to use big unencrypted template with no private data and crypted variables in vault storage. Usually in big configuration file not all data need to be secured, only some variables. On Friday, December 18, 2015 at 10:14:49 PM UTC+5, Colin Byrne wrote: > > But can you encrypt the tem

[ansible-project] Re: Pass vault variables into large config vault file.

2015-12-17 Thread Alexey Vazhnov
May be you need to use big template with some vars stored in vault storage? On Friday, December 18, 2015 at 5:36:00 AM UTC+5, Colin Byrne wrote: > > > Hey, > > > So I have a large config file that needs to be encrypted when pushed to a > private repository. There are multiple server groups which

[ansible-project] Re: Using ec2_facts inside a playbook syntax

2015-12-14 Thread Alexey Vazhnov
ec2_facts return variables with name ansible_ec2*. If you want to see all variables, try to use https://github.com/f500/ansible-dumpall «{{ ansible_facts.ansible_ec2_ami_id }}» is wrong, use «{{ ansible_ec2_ami_id }}». On Tuesday, December 15, 2015 at 6:39:19 AM UTC+5, Vasiliy Boulytchev wrote:

[ansible-project] Re: Dynamic inventories, EC2 tags, and commas

2015-11-05 Thread Alexey Vazhnov
I use this: In playbook: --- - hosts: all gather_facts: yes sudo: yes roles: - aws_common - { role: aws_web, when: "'web' in roles" } - { role: aws_data, when: "'data' in roles" } in role «aws_common»: # File: roles/aws_common/tasks/set_facts.yml --- - set_fact: roles: "{

[ansible-project] Re: ec2 inventory to return Name tags

2015-10-20 Thread Alexey Vazhnov
Try to set in your ec2.ini: destination_variable=Name On Friday, October 16, 2015 at 10:16:13 AM UTC+5, Nicolas G wrote: > > Hi, > > I'm able to run Ansible on AWS using ec2.py successfully but unfortunately > I get the public DNS of the instance instead of the Name tag : > > ansible -i plugins/