Re: [ansible-project] modules apt: only_upgrade fail

2016-07-28 Thread richard934935
Woo!! Thanks a lot 在 2016年7月29日星期五 UTC+8上午1:15:48,Kai Stian Olstad写道: > > On 28. juli 2016 11:00, richar...@gmail.com wrote: > > Thank you very much , > > > > I know it right now ,thank you very much > > > > you get the stdout message used register and debug ?? > > No, I use a callback

[ansible-project] Insert hosts and host variables into a python script

2016-07-28 Thread Dana Christo
Hello, Is it possible to take a hostname and other information in the hosts file and insert each one into a python file as an ansible playbook runs the python file for each host? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscri

Re: [ansible-project] Test that a variable is a valid IP address

2016-07-28 Thread Kai Stian Olstad
On 28. juli 2016 23:19, Ryan Groten wrote: I'm trying to create a task that verifies a variable is a valid IP address. The task should pass if it is valid, and fail if it's not. I feel like I'm close, but not quite there with this: - name: Verify IP address assert: { that: "{{ requested_i

[ansible-project] Re: Change exit code of ansible-playbook if there are any changes

2016-07-28 Thread Ryan Groten
How about detecting the changed task(s) from within the playbook itself and create another task that calls a Jenkins API (assuming that's possible)? Eg: - name: Check for divergence command: register: is_diverged - name: Call Jenkins to un-diverge command: when: is_diverged | changed

[ansible-project] Test that a variable is a valid IP address

2016-07-28 Thread Ryan Groten
I'm trying to create a task that verifies a variable is a valid IP address. The task should pass if it is valid, and fail if it's not. I feel like I'm close, but not quite there with this: - name: Verify IP address assert: { that: "{{ requested_ip | ipaddr }}" } always_run: yes This

[ansible-project] run command on several nodes, but run another command on first node

2016-07-28 Thread kfrydrys ILIM
Hi, I want to use ansible to start MariaDB/GaleraCluster I need to run 1. */usr/bin/mysqld_safe --wsrep-new-cluster &* on the one of the nodes first (there is no important it node1, or node4). 2. next I want to run *systemctl start mariadb * on every other node in the cluster (excluding nod

[ansible-project] Re: ansible 2.0.1.0 run show version with Cisco ASA-55x0

2016-07-28 Thread Brandon
I've found that by copying and modifying ios.py in ../ansible/module_utils/ and then pointing ios_template to this new module its easy to change "terminal length 0" to "terminal pager 0". Doing so, however, has apparently broken something else because now Ansible does not interpret templates co

[ansible-project] ssl: auth method ssl requires a password

2016-07-28 Thread Arun John Varughese
Hi, I am having an issue trying to connect to my windows server in the internal network, as I get this error: TASK [setup] *** fatal: [10.xxx.xxx.xxx]: UNREACHABLE! => {"changed": false, "msg": "ssl: auth method ssl requires a p

[ansible-project] Re: Blockinfile indentation

2016-07-28 Thread Alli
You can use a block indentation indicator http://www.yaml.org/spec/1.2/spec.html#id2793979 e.g: - blockinfile: dest: /etc/postfix/master.cf insertafter: "^submission inet n - n - - smtpd$" block: |2 -o syslog_name=postfix/submission -o .

[ansible-project] Re: How to check if the current user has write access to a given path ?

2016-07-28 Thread Alli
Would stat achieve this for you? http://docs.ansible.com/ansible/stat_module.html On Thursday, 28 July 2016 21:36:56 UTC+12, ishan jain wrote: > > I am trying to check via Ansible that whether the user (being used to > connect) has write access to a given path - both on *linux hosts and > wind

[ansible-project] ssl: auth method ssl requires a password

2016-07-28 Thread Arun John Varughese
Hi, While trying to connect to a windows VM through Ansible I get this issue: TASK [setup] *** <10.xx.xx.xx> ESTABLISH WINRM CONNECTION FOR USER: winad-admin on PORT 5986 TO 10.xx.xx.xx fatal: [10.xx.xx.xx]: UNREACHABLE! => {"cha

[ansible-project] Re: Conditional execution of tasks failing

2016-07-28 Thread GANA SAGAR
I took out the curly brackets from the groups and and the normal bracks..its works fine On Tuesday, 26 July 2016 20:33:34 UTC-4, GANA SAGAR wrote: > > Hi, > > I am trying to write a task to be executed over 4 groups. 2 of them are > based on location 'sb' 'ada' and 2 of them based on distr

[ansible-project] Change exit code of ansible-playbook if there are any changes

2016-07-28 Thread Łukasz Górski
Hi, is there any sensible option to make ansible-playbook exit with non-0 exit code if there are any changes to be made to target hosts? The rationale for this is: we want to start using Jenkins to test if our production infrastructure has not diverged from the state described in Ansible roles an

[ansible-project] Re: ansible 2.1 setup fails with this module requires key=value arguments (['<>'])

2016-07-28 Thread Roman Gaufman
Hi Greg, I'm experiencing the same thing on 2 servers, rest are fine. I can ssh to them and I cannot see anything obviously wrong: TASK [setup] *** fatal: [0ca87760df7de0fe2d36]: FAILED! => {"changed": false, "failed": true, "msg

[ansible-project] Re: win_regedit error "Input string was not in a correct formatInput string was not in a correct format"

2016-07-28 Thread Дубровин Юрий
I'm sorry. I forgot to write a version of the program. Unfortunately I have installed version 2.0.0.2. Today I will try to install the new version. понедельник, 25 июля 2016 г., 23:09:02 UTC+3 пользователь Дубровин Юрий написал: > > Hello. > > I have a problem with win_regedit. > > My code: > >

[ansible-project] how to compare two dates (possibly in different format) in jinja2 templates ?

2016-07-28 Thread ishan jain
I am writing a template in which the warning output is generated if the winRM certificate of target windows host is going to expire in 1 month. I just don't see a way how can i compare two dates in jinja2 template. I have the winrm certificate expiration time in the fact - ansible_winrm_certifi

[ansible-project] Ansible 2.1.1.0-1 FINAL has been released!

2016-07-28 Thread James Cammarata
Hi all, we're very happy to announce that Ansible 2.1.1 has been released! This release fixes many bugs, summarized here from previous RC emails: * Fixed some bugs in variable dependency resolution. These were mainly related to includes and roles, to bringe the VariableManager code in-line with o

Re: [ansible-project] modules apt: only_upgrade fail

2016-07-28 Thread Kai Stian Olstad
On 28. juli 2016 11:00, richard934...@gmail.com wrote: Thank you very much , I know it right now ,thank you very much you get the stdout message used register and debug ?? No, I use a callback plugin that give a more human readable output. The one I use is this one https://github.com/n0ts/ans

[ansible-project] Safe method to resize existing filesystem

2016-07-28 Thread Joanna Delaporte
I was looking at the filesystem module today, hoping to use it to resize a filesystem that is living in a logical volume. However, I am not sure how to use it safely so it doesn't create a filesystem. Has anyone used the filesystem module to resize an LV? If so, how did you do it? Thanks! Joann

[ansible-project] Re: Windows playbooks causes cryptographic, windows remote management services to crash

2016-07-28 Thread Michael Perzel
Forgot to mention we've also experimented with increasing the winrm maxconcurrentusers, maxprocessespershell, maxshellsperuser settings but haven’t seen any difference in behavior. >winrm get winrm/config/winrs Winrs AllowRemoteShellAccess = true IdleTimeout = 720 MaxConcurre

[ansible-project] Windows playbooks causes cryptographic, windows remote management services to crash

2016-07-28 Thread Michael Perzel
Since upgrading to ansible 2.0 my windows playbooks have been failing with the following error. This error has been seen when running setup, win_template, script tasks. The easiest way to repeat it is to have multiple simultaneous runs of ansible affecting the same host. If we re-run the exact

[ansible-project] loop over roles?

2016-07-28 Thread Dick Visser
Hi I have a bunch of roles in my playbook: roles: - role_1 - role_b - { role: install_app, install_dir=/opt/foo } - { role: install_app, install_dir=/opt/bar } - { role: install_app, install_dir=/opt/baz } - finalrole Suppose I have a var that contains apps: foo bar baz Wou

[ansible-project] No epoch or seconds in windows facts ? How can i generate unique strings ?

2016-07-28 Thread ishan jain
Here is a small part of windows facts: "ansible_facts": { "ansible_architecture": "64-bit", "ansible_date_time": { "date": "13.07.2016", "day": "13", "hour": "06", "iso8601": "2016-07-13T06:34:29", "minute": "34",

[ansible-project] nxos_template module time-out when banner motd is broken into several lines

2016-07-28 Thread Martin Baro
Hi, I'm getting "time-out trying to send command" error message when trying to push banner motd template to nxos like: banner motd # unauthorized access prohibited # It is working fine if the message is consolidated into 1 line. Tried different delimiters also without success. Running ansible 2.

Re: [ansible-project] Shell Module and escaping quotes

2016-07-28 Thread Jason Gilfoil
Awesome! That worked :) Thanks so much for your help. On Thursday, July 28, 2016 at 2:43:02 AM UTC-4, Kai Stian Olstad wrote: > > On 28. juli 2016 00:42, Jason Gilfoil wrote: > > I ran with the idea of grabbing the last log line in a separate task and > > using a when conditional however now i'm

[ansible-project] docker_container device IOPS limit

2016-07-28 Thread Alvaro Gil
Hello, I am looking for define IOPS limit for a container using docker_container module but it doesn't seems to be supported. Any suggestion about how to do it? Thanks! -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from t

[ansible-project] Re: Ansible 2.0 -- "shade is required for this module"

2016-07-28 Thread navdeep uniyal
Could you resolve the issue? If yes, please share the solution here. I am not using virtualenv, still getting the same issue. Thank you On Thursday, July 21, 2016 at 10:24:50 PM UTC+2, zer...@issany.net wrote: > > Hi, forgive me for my bad english. > > I have exactly the same problem with ansib

[ansible-project] Re: Ansible 2.0 -- "shade is required for this module"

2016-07-28 Thread navdeep uniyal
Could you resolve the issue? If yes, please share the solution here. I am not using virtualenv, still getting the same issue. Thank you On Thursday, July 21, 2016 at 10:24:50 PM UTC+2, zer...@issany.net wrote: > > Hi, forgive me for my bad english. > > I have exactly the same problem with ansib

[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

Re: [ansible-project] yum groupinstall "Development tools" for mutliple Linux-based OS

2016-07-28 Thread Mark Janssen
Or... use something like: pkg: name="{{item}} state=installed with_items: - {{devtools}} and then have devtools be a list of the relevant packages set in group_vars or some included file based on OS On Thu, Jul 28, 2016 at 12:58 PM, Mark Janssen wrote: > Add a conditional on your current tas

Re: [ansible-project] yum groupinstall "Development tools" for mutliple Linux-based OS

2016-07-28 Thread Mark Janssen
Add a conditional on your current task to only run on centos/redhat, something along the lines of: when: ansible_os_family == "RedHat" And then make a second task: tasks: - name: Install Development Tools, git, curl, htop apt: name={{ item }} state=present with_items: - build-esse

[ansible-project] How to check if the current user has write access to a given path ?

2016-07-28 Thread ishan jain
I am trying to check via Ansible that whether the user (being used to connect) has write access to a given path - both on *linux hosts and windows hosts*. I tried looking around but i could not get an easy way to do that. I might be getting wrong paths a lot, so the typical commands with raw mo

Re: [ansible-project] modules apt: only_upgrade fail

2016-07-28 Thread richard934935
Thank you very much , I know it right now ,thank you very much you get the stdout message used register and debug ?? 在 2016年7月28日星期四 UTC+8下午2:58:23,Kai Stian Olstad写道: > > On 28. juli 2016 07:54, richar...@gmail.com wrote: > > Thanks for you suggestion but I just get this when use you way > >