[ansible-project] Re: Ansible issues with Windows deployment

2018-03-20 Thread 12177589
Ok, it should be the syntax of win_shell. The error is as follows: 在 2018年3月21日星期三 UTC+8上午11:12:59,Jordan Borean写道: > > You p

[ansible-project] Re: Ansible issues with Windows deployment

2018-03-20 Thread Jordan Borean
You pretty much need to copy the win_shell task as it was (with any credential or path changes you need). You also don't need the win_copy tasks as the win_shell task will do that for you, I only provided that example to show you how it is easier to use become when 2.5 comes out. In the future,

[ansible-project] napalm-ansible...NXOS

2018-03-20 Thread Sunil6057
hi --- - hosts: leaf connection: local tasks: - napalm_install_config: hostname: "{{ inventory_hostname }}" username: "{{ username }}" password: "{{ password }}" dev_os: "{{ nxos }}" config_file: leaf.conf commit_changes: True diff_fi

[ansible-project] Re: Ansible issues with Windows deployment

2018-03-20 Thread 12177589
Thank you very much for your reply. I tried to use win-shell, but there was a syntax error! Because I can't understand this meaning, please help to see! As follows: - hosts: dbServer tasks: - name: shell - win_shell: $username: 'xie11' $password: '11' $sec

[ansible-project] Re: vault-encrypted admin_password issues in azure_rm_virtualmachine module

2018-03-20 Thread Jordan Borean
No worries, glad it worked out in the end and wasn't a bug in the module. -- 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...@googlegr

[ansible-project] current run timestamp

2018-03-20 Thread orderedchaosdev
I want to set it up so there is a current ansible playbook run timestamp set at the start of every playbook run so I can use this var in various roles. The only way so far I have found is to set a pre_task with set fact in every playbook. Does anyone have any suggestions or information on a curr

[ansible-project] Aliases + module.params

2018-03-20 Thread Alex Stephen
I'm in the process of writing an Ansible module. I've currently got an Ansible task that includes this piece of code: ``` ... allowed: - ip_protocol: 'tcp' - port: '22' ... ``` AnsibleModule looks something like this: ``` AnsibleModule( argument_spec=dict( allowed=dict(type='

[ansible-project] Re: vault-encrypted admin_password issues in azure_rm_virtualmachine module

2018-03-20 Thread Alex Pilon
Hey Jordan, Thanks for the answer, and sorry for my delay. Weekend, AWX setup and other things got in the way of me trying this out. Did your suggestions. The first one returned the proper value, so that's a good sign. Did the second one: Worked fine as well, which confused me. I removed the li

Re: [ansible-project] Inventory

2018-03-20 Thread Brian Coca
- hosts: test tasks: - task1 - task2 - task3 - task4 - task5 - hosts: test[0], test[1] tasks: - task6 - task7 - task8 - hosts: test[-1] tasks: - task9 - task10 -- -- Brian Coca -- You received this message because you are subscribed to the

[ansible-project] Inventory

2018-03-20 Thread Vino B
Hi All, Can someone provide me an example on how to accomplish the below task, I have 10 task, I need to execute 5 task on all the host which are under the group test in the inventory file and task 6-8 on first 2 servers only and the task 9-10 to the last server only. Host file [test] Server1

[ansible-project] Re: How to remote to Windows using Linux

2018-03-20 Thread Rachel Leonard
Jordan, Thank you! They enabled and listening. I read there could be a bug with TLS. I reading more about that. Thank you, Rachel On Monday, March 19, 2018 at 2:35:34 PM UTC-7, Jordan Borean wrote: > > Have you enabled the WinRM listeners and configured WinRM itself, you can > check by r

Re: [ansible-project] Using serial strategy for playbook imported in a toplevel playbook causes entire play termination if some host is unreachable

2018-03-20 Thread Marcos Alano
I ran a playbook on batches and one host failed but just that batch stopped. On Tue, Mar 20, 2018 at 12:55 PM, Andrey Agenosov wrote: > Hello all. > Here is a simplified example: > - import_playbook: test_unavailable_node_different_strategy.yml > > - hosts: 127.0.0.1 > connection: local > > # T

Re: [ansible-project] Re: Absurd run_once behavior, skipping entirely if first node fails a when test

2018-03-20 Thread Alex Hunt
Thanks everyone, I think the root of the issue is finally clear. I'd love to have a 'run_first_host_that_matches_when' keyword, though I understand there might be technical issues getting in the way. I think the most intuitive way to set the status would be to set it for all hosts that match th

[ansible-project] debug output for task

2018-03-20 Thread Cyberbob
Hi team, i have this playbook: --- - hosts: "{{ leaf_name }}" gather_facts: no connection: local vars_prompt: - name: "leaf_name" prompt: "Enter switch hostname/ip" private: no - name: "vlan_id" prompt: "Enter access vlan for L2 ACCESS setup (example 10)" private: no

[ansible-project] source archive succeeds however, downloading and unarchiving fails

2018-03-20 Thread danish09
Hi, Please provide your suggestions. Kindly help me on what mistake I am doing, ansible --version ansible 2.4.3.0 config file = None configured module search path = [u'/home/xx/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lo

[ansible-project] Re: how to convert Template to VM

2018-03-20 Thread Sebastien Desbois
Sorry, I didn't understand properly. You want to convert a template to a VM. Can't do that with vmware_guest. To do that, I'm using a Powercli script executed by Ansible. Le mardi 20 mars 2018 17:13:42 UTC+1, Sebastien Desbois a écrit : > > Hello, > > It is possible. > Seems that you are missing

[ansible-project] Re: how to convert Template to VM

2018-03-20 Thread Sebastien Desbois
Hello, It is possible. Seems that you are missing a few parameters Here is an example of task that can work: (the tasks: - name: Create VM from template vmware_guest: hostname: "{{vcenter_IP}}" username: "{{vcenter_user}}" password: "{{vcenter_pass}}" valida

[ansible-project] Using serial strategy for playbook imported in a toplevel playbook causes entire play termination if some host is unreachable

2018-03-20 Thread Andrey Agenosov
Hello all. Here is a simplified example: - import_playbook: test_unavailable_node_different_strategy.yml - hosts: 127.0.0.1 connection: local # The question is would we end up here in case of imported playbook (above) touches unavailable host tasks: - debug: msg="Playbook finished"Введит

[ansible-project] Pass output variable of one role as an input to another role

2018-03-20 Thread Ukesh Kumar Vasudevan
Hi, I am having the below ansible script. While executing the script, I am getting error in the role 'install-packages'. The error is, "msg": "The task includes an option with an undefined variable. The error was: {{ ip }}: 'ip' is undefined. It is looking for 'ip' variable inside the role 'i

Re: [ansible-project] setting environment variables

2018-03-20 Thread danish09
Thank you for responding to me. I am stuck now at some silly mistake of mine in that playbook. I will come back to your suggestion as soon as I correct the error. Thanks for your advise again. On Tuesday, 20 March 2018 13:31:36 UTC, Brian Coca wrote: > > as you have it there, the `environment`

Re: [ansible-project] Re: Absurd run_once behavior, skipping entirely if first node fails a when test

2018-03-20 Thread Brian Coca
A couple of clarifications, these are important when you hit the corner case in which it matters: - its not 'run on the first host in play/inventory' its 'run on the first host that reaches the task' which means that hosts that fail and/or are removed in previous tasks are not considered. Normall

Re: [ansible-project] Re: Absurd run_once behavior, skipping entirely if first node fails a when test

2018-03-20 Thread Josh Smift
Yep, your suggestions there are the kind of things I had in mind with the phrase "ugly-ass workaround". :^) (They're task-level, and can't be applied to the inclusion of the role in the playbook; they require baking logic about the way you manage colors into the role; etc.) `run_once: true` is

Re: [ansible-project] setting environment variables

2018-03-20 Thread Brian Coca
as you have it there, the `environment` keyword ONLY affects the get_url task, I would add it to the include so all included tasks inherit it or put all tasks in install_java in a block that has the environment keyword attached to it. -- -- Brian Coca -- You received this message beca

[ansible-project] Re: running a command & remotely

2018-03-20 Thread Mike Klebolt
Sounds like you may want to use async “fire and forget” by specifying a poll value of 0. http://docs.ansible.com/ansible/latest/playbooks_async.html -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop rece

Re: [ansible-project] running a command & remotely

2018-03-20 Thread Brian Coca
use nohup to detach the tty. In any case, it is not a good way to start backgrounded services, it is much better to use the init system or some other service control software on the target. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "

Re: [ansible-project] Starting AppDynamics with play

2018-03-20 Thread Patrick Hunt
Good idea Kai, thank you. -- 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 a

[ansible-project] running a command & remotely

2018-03-20 Thread Abhijit Chakraborty
Hi all, I am running a command using the command module. This is how it is *- name: start* *command: /opt/eate/bin/script.pl >/dev/null &* Now the problem is , after running the command, its not able to come out and i have to manually abort the playbook to com

[ansible-project] setting environment variables

2018-03-20 Thread danish09
Hi, I know the solution to this topic has been posted many times and I have tried searching through google and other forums including the ansible docs but unfortunately, nothing seems to be working for me. Please provide your feedback and help me with the solution. Also please let me know if yo

[ansible-project] Jumphost + Ansible

2018-03-20 Thread Luke Baldan
Hi, I've started my ansible journey and i am impressed so far. A function i am hoping to utilise is the ability to connect via a jump/bastion host in order to get to my devices i wish to run commands on. The issue is that in order to get to a device i want ansible to run commands on, i need to