[ansible-project] Re: Line breaks are excluded when copying a file from ansible linux host to windows server using win_copy

2017-09-03 Thread Nick Mellor
Hi Ishan, As mentioned previously, the file has not changed, just that Windows and Linux expect different line endings. This is what worked for me using Powershell, converting Linux line-endings to Windows line-endings: - name: convert line endings from Linux to Windows (PowerShell) w

Re: [ansible-project] Re: Structuring and managing multiple unrelated projects

2017-09-03 Thread jamiepaulburchell
They are at the moment at least webservers each hosting a project or group of projects relating to a particular client. It makes resource allocation and billing easier. It affords us the facility to throw hardware resources or scale up a client's needs. But although each server is essentially a

Re: [ansible-project] Re: Structuring and managing multiple unrelated projects

2017-09-03 Thread Pshem Kowalczyk
Hi, I think it's down to your work split/structure. In our case each project operates on separate set of hosts. So we have separate inventories for each of them. Perhaps there's some sort of logical grouping structure you could create for your hosts and run playbooks based on those groups (with a

[ansible-project] Re: Structuring and managing multiple unrelated projects

2017-09-03 Thread jamiepaulburchell
I could duplicate the hosts in each project in to one central hosts file (yuk) and at least that way I could run an ad hoc command and target them. I couldn't rely on group_vars or host_vars though - I'd have to pass in parameters in a playbook directly or on the command line I guess. -- You r

[ansible-project] Re: Structuring and managing multiple unrelated projects

2017-09-03 Thread jamiepaulburchell
So after converting my structure to the "each project has its own ansible.cfg and inventory" the worst issue I don't appear to be able to solve is targeting hosts in different projects. If I need to run an ad hoc command on all hosts, I literally have to enter each project directory and run the

[ansible-project] ec2_group is not idempotent

2017-09-03 Thread Josh Smift
Is this the same problem as https://github.com/ansible/ansible-modules-core/issues/1068 ? It looks from your output like it might be: 138.68.160.0/20, TCP, from port: 22, to port: 22, ALLOW" already exists fatal: [localhost]: FAILED! => {"changed": false, "error": {"code": "InvalidPermission

Re: [ansible-project] do post_tasks execute when a role fails?

2017-09-03 Thread Josh Smift
Does 'meta: clear_host_errors' help in this situation? http://docs.ansible.com/ansible/latest/playbooks_error_handling.html#resetting-unreachable-hosts only mentions this as affecting unreachable hosts, but http://docs.ansible.com/ansible/latest/meta_module.html mentions that it clears the failed s