Re: [ansible-project] service state=stopped fails if service not installed - why?

2017-05-22 Thread Brian Coca
it verifies that the service is stopped, not existing is not the same as stopped, which for the module implies existence. You can use failed_when and/or ignore errors to customize this behaviour. -- Brian Coca -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] ansible and cvs

2017-05-22 Thread Brian Coca
There is no CVS module currentlym, but you should be able to use shell/command module to invoke it. Considering the command similarities with subversion, it would not be hard to create one. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "

[ansible-project] Using Ansible authorized_key, how can I copy the keys from all hosts in a group?

2017-05-22 Thread Bob Lawson
I'm trying to use Ansible to copy keys from multiple hosts to a remote host user's authorized_key file. In my inventory, I have a collectors group and receiver group, as follows: [collectors] c1 c2 c3 [receiver] r1 I want to copy the ssh key from each host in the collectors group to the

[ansible-project] Ansible ios_command module - Failure execution basic commands on a Cisco IOS device

2017-05-22 Thread Reza Toghraee
Hello Ansible version: 2.3.0.0 Python version = 2.7.13 (default, May 11 2017, 16:44:39) [GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] Host : CentOS release 6.9 (Final) Paramiko version : 2.1.2 I'm trying to use ansible and ansible ios_command to execute a basic 'show version' command on a cisco cat

[ansible-project] How to edit a variable in a later variable file

2017-05-22 Thread Adam Lininger
I would like to be able to edit a variable (per host) that was originally defined in a default file. The larger situation is this. We have a large number of servers with a defined set of local accounts. The list of accounts is defined something like this in the default.yml file for the role. Th

[ansible-project] Re: Ansible on Xenial can no longer find six_py file

2017-05-22 Thread John Hardt
I ran into the identical problem on RHEL7. What I found was that installing the VMware-vSphere-CLI-6.5.0 installed the following files: lrwxrwxrwx. 1 root root 26 May 18 23:20 /usr/bin/six.pyc -> /opt/vmwarecli/bin/six.pyc -r--r--r--. 1 root root 31988 May 18 23:20 /opt/vmwarecli/bin/six

[ansible-project] Getting SSL issue on MACOS (10.11.6)

2017-05-22 Thread Selva Prabhu
Getting SSL certificate issue on my mac. TASK [kubectl : download kubectl from cumulus repo] task path: /Users/sprabhu/github/deployment-armada-develop/roles/kubectl/tasks/main.yml:34 fatal: [controller]: FAILED! => {"changed": false, "failed": true, "msg": "Failed

[ansible-project] service state=stopped fails if service not installed - why?

2017-05-22 Thread bengland
While using ceph-ansible purge-cluster.yml script I ran into this problem. If you run a task like: - name: stop ceph mdss with systemd service: name: ceph-mds@{{ ansible_hostname }} state: stopped enabled: no when: ansible_service_mgr == 'systemd' when the service was

Re: [ansible-project] file mode

2017-05-22 Thread Kai Stian Olstad
On 20. mai 2017 15:51, 'Michael Pöllinger' via Ansible Project wrote: Hi folks. Perhaps i´m wrong, but if i set a file mode with: - file: path: /usr/lib/rssh/rssh_chroot_helper mode: 4755 I would expect something like: -rwsr-xr-x 1 root root 30728 Nov 8 2014 rssh_chroot_helper But i ge

[ansible-project] Re: Run powershell script on Windows servers which require Powershell to be run with admin privilages

2017-05-22 Thread Jordan Borean
I could be wrong but when calling script it looks locally on the Ansible box and not the windows one. Can you specify your script without using win_copy and see what happens? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe fr

[ansible-project] Re: Load variables based on the environnement (test, val, prod)

2017-05-22 Thread John Jolet
I set those in group_vars/appname-stg.yml, group_vars/appname-dev.yml, etc. as long as a host only belongs to one environment-grouping, this works great. On Monday, May 22, 2017 at 9:18:21 AM UTC-5, Wilfried Anuzet wrote: > > Hello to all Ansible guru :) > > I write a playbook to deploy a newest

[ansible-project] Re: Run powershell script on Windows servers which require Powershell to be run with admin privilages

2017-05-22 Thread Trond Hindenes
There's no such thing as UAT/"run as admin" when using WinRM (which Ansible does). What does your script do, exactly? On Monday, May 22, 2017 at 4:19:12 PM UTC+2, Ashish Vijay wrote: > > Hello All, > > I want to execute one powershell script on few target servers which > require powershell to be

[ansible-project] HOW TO INSTALL VAGRANT IN FEDORA25

2017-05-22 Thread devopsaws . santhosh
hai sir, may i know the process of installation vagrant up in fedora 25 its not installed i tried and followed so many blogs but no soution..can anyone know the instalation steps... -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubsc

[ansible-project] Help with Amazon STS Module [sts_assume_role]

2017-05-22 Thread Brian O Mahony
I am starting to use ansible for my AWS environment and have run into a few snags with the STS Module. I am relatively new to ansible, so it may just be user error :) Apologies if these are Issue #1: I have set thefollowing variables: sts_role_arn: "arn:aws:iam::1234567890:role/My_AccountAccess

[ansible-project] Re: [ansible-devel] Re: Variable precedence change/fix coming in 2.3

2017-05-22 Thread Brian Coca
I might have a 'solution' ... configurable precedence, this is something I've been toying with in http://github.com/ansible/ansible/issues/23001. config setting (need to add to examples/ansible.cfg) : https://github.com/ansible/ansible/pull/23001/files#diff-b77962b6b54a830ec373de0602918318R249 dr

[ansible-project] Unreachable, msg: Authentication failure

2017-05-22 Thread Luvpreet Singh
This is my first time, and I am facing this issue. I have used ansible_ssh_pass, and ansible_ssh_user also. But this message is coming, luvpreet@DHARI-Inspiron-3542:/etc/ansible$ sudo ansible -m ping all vogo-alpha.cloudapp.net | UNREACHABLE! => { "changed": false, "msg": "Authenticati

[ansible-project] Unreachable, msg=Authentication Failure

2017-05-22 Thread Luvpreet Singh
I have just started Ansible today and is facing this early issue. I have declared ansible_ssh_pass and ansible_ssh_user in the hosts file. But still this error is coming, Why iis this an issue ? luvpreet@DHARI-Inspiron-3542:/etc/ansible$ sudo ansible -m ping all vogo-alpha.cloudapp.net | UNREACH

[ansible-project] EC2_ASG module failure

2017-05-22 Thread Taylor Lewick
I am trying to create an ASG from within a playbook. Running ansible 2.2.1 from Mac OS. Playbook below: #setup Logstash Autoscaling group - name: ELkstack LogStash ASG ec2_asg: name: "pro-ELK-LogStash-ASG" launch_config_name: "test-logstash-asg" health_check_p

[ansible-project] Ansible Control Machine failure and long running tasks

2017-05-22 Thread Nicolas B
Hello! Recently, I have started looking at Ansible to be used as an orchestration engine. I need the engine to support long running tasks, and as Ansible supports asynchronous actions with polling, it could fit my use case perfectly. However, I was wondering what would happen if the control ma

[ansible-project] Problems using AWS Dynamic Inventory with STS Profiles

2017-05-22 Thread Ric
ANSIBLE VERSION ansible 2.3.0.0 config file = configured module search path = Default w/o overrides python version = 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] CONFIGURATION https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/ec2.

[ansible-project] roles dependencies tests and DRY

2017-05-22 Thread Michée Lengronne
Hello, I am currently developing and refactoring custom ansible roles and I would like to know how can I do to call dependencies in a role from its tests folder without rewriting a requirements.yml in this folder ? I would like to respect the DRY principle. Thank you. -- You received this

[ansible-project] Run powershell script on Windows servers which require Powershell to be run with admin privilages

2017-05-22 Thread Ashish Vijay
Hello All, I want to execute one powershell script on few target servers which require powershell to be run as administrator. I am getting access denied error when i try with normal playbook. - name: Install software on Wndows Remote server. hosts: all tasks: - name: copy script win_

[ansible-project] file mode

2017-05-22 Thread 'Michael Pöllinger' via Ansible Project
Hi folks. Perhaps i´m wrong, but if i set a file mode with: - file: path: /usr/lib/rssh/rssh_chroot_helper mode: 4755 I would expect something like: -rwsr-xr-x 1 root root 30728 Nov 8 2014 rssh_chroot_helper But i get this as result: --w--w--wt 1 root root 30728 Nov 8 2014 rssh_chroot_h

[ansible-project] unable to sudo su to another user and execute commands

2017-05-22 Thread vish man
Hi, Thanks in advance for helping me. my ladap user on production server is "viman" my sudo su user on production server is "cassdb" I am trying to execute commands as cassdb user like id, ps -ef|grep ..., but it gives error 10.45.206.104 | FAILED! => { "changed": false, "failed":

[ansible-project] How to get the version of the installed package with regexp via Ansible?

2017-05-22 Thread Антон Пацев
There are several packages with a common name: package-somethins1 package-special --- - hosts: Special_hosts name: "Get version of RPM" tasks: - name: yum_command yum: list=installed register: yum_packages - debug: var=item with_items: "{{yum_packages|json_

[ansible-project] Ansible Control Machine failure and long running tasks

2017-05-22 Thread Nicolas B
Hello! Recently, I have started looking at Ansible to be used as an orchestration engine. I need the engine to support long running tasks, and as Ansible supports asynchronous actions with polling, it could fit my use case perfectly. However, I was wondering what would happen if the control ma

[ansible-project] ansible and cvs

2017-05-22 Thread Alessandro Basili
Hi there, I'm trying to setup a deployment of various sources that are scattered among various vcs repositories (git, cvs, hg, ...) and while I found most of the stuff on the available modules (http://docs.ansible.com/ansible/list_of_source_control_modules.html) I haven't yet found a cvs modul

[ansible-project] Test ansible rtoles with dependencies and DRY principle.

2017-05-22 Thread Michée Lengronne
Hello, I am currently developing and refactoring custom ansible roles and I would like to know how can I do to call dependencies in a role from its tests folder without rewriting a requirements.yml in this folder ? I would like to respect the DRY principle as requirements are already set in t

[ansible-project] Post-install tasks for EC2 in private subnet

2017-05-22 Thread Amedix
Hi there, I have an ansible playbook and its purpose is to provision AWS EC2 instances in a private subnet. The playbook has two parts, the first one is to create the EC2 instance and works fine, however the second part is the post install tasks. How can I execute ansible roles against th

[ansible-project] Load variables based on the environnement (test, val, prod)

2017-05-22 Thread Wilfried Anuzet
Hello to all Ansible guru :) I write a playbook to deploy a newest Jboss infrastructure. I want to use a loop to iterate over a list of items to deploy all the datasource I need, all the datasources change based on the environnement they're deployed Here the part of my role to add the datasourc

Re: [ansible-project] Dependency check between roles

2017-05-22 Thread Dick Davies
I started liking the dependency model but it was generally met with confusion by other admins, so we started being explicit in the play. e.g. we'd have an nginx role that setup a 'conf.d' folder to auto-include vhost definitions. That would be nginx_confd_dir , set in roles/nginx/defaults/main.yml

[ansible-project] Using powercli in Ansible

2017-05-22 Thread Bob Nian
Is it possible to use powercli in Ansible? This is because I am trying to harden an EXSi host but I am trying simpler code first which is disabling SSH service. I've created two files, one is for my powercli script and another is a .yml file. However, I encountered an error. This is how it look

Re: [ansible-project] Dependency check between roles

2017-05-22 Thread Jose Luis Fernández Pérez
That's what I'm doing now and it works but I find two trade offs with this approach. 1. You pollute the global scope with facts, and you are at risk of name clashing 2. You have to explicitly write the guard with code, something that is going to be the same in several roles. That's more boilerp