Re: [ansible-project] Tagging all imported tasks

2018-11-28 Thread Andy Smith
Hi Kai, On Thu, Nov 29, 2018 at 06:41:03AM +, Andy Smith wrote: > On Thu, Nov 29, 2018 at 07:17:06AM +0100, Kai Stian Olstad wrote: > > Since you are setting the tag on the role in the play, you don't need to tag > > it here again. > > If I leave out the "tags=some_server" and then do: > >

Re: [ansible-project] Tagging all imported tasks

2018-11-28 Thread Andy Smith
Hi Kai, On Thu, Nov 29, 2018 at 07:17:06AM +0100, Kai Stian Olstad wrote: > On 29.11.2018 06:21, Andy Smith wrote: > >If I add a tag attribute to each of those imports, i.e.: > > > >- import_tasks: configure_this.yml tags=some_server > >- import_tasks: create_that.yml tags=some_server > >-

Re: [ansible-project] Tagging all imported tasks

2018-11-28 Thread Kai Stian Olstad
On 29.11.2018 06:21, Andy Smith wrote: Is there a way to apply a tag to all of the import_tasks statements in a role's tasks/main.yml file without stating it on every import_tasks line? That is, given a directory structure a bit like this: . ├── roles │   ├── some_server │   │   └── tasks │  

Re: [ansible-project] Re: Creating an aws target group with ansible

2018-11-28 Thread Karl Auer
I suggest for readability that you build a list using set_fact:, then pass the list to the targets: parameter. Regards, K. On Thu, Nov 29, 2018 at 4:36 PM flowerysong wrote: > On Wednesday, November 28, 2018 at 11:16:58 PM UTC-5, joeldamata wrote: > >> What Im trying to accomplish is to

[ansible-project] Re: Creating an aws target group with ansible

2018-11-28 Thread flowerysong
On Wednesday, November 28, 2018 at 11:16:58 PM UTC-5, joeldamata wrote: > What Im trying to accomplish is to create a network load balancer target > group from dynamically generated list of instances. > > brokerInstancesList is a list of instance ids. I need to iterate over this > list and add

[ansible-project] Tagging all imported tasks

2018-11-28 Thread Andy Smith
Hi, Is there a way to apply a tag to all of the import_tasks statements in a role's tasks/main.yml file without stating it on every import_tasks line? That is, given a directory structure a bit like this: . ├── roles │   ├── some_server │   │   └── tasks │   │   ├── configure_this.yml │   │ 

[ansible-project] Creating an aws target group with ansible

2018-11-28 Thread joeldamata
What Im trying to accomplish is to create a network load balancer target group from dynamically generated list of instances. brokerInstancesList is a list of instance ids. I need to iterate over this list and add them as targets to this target group. - name: "Create 9092 target group"

[ansible-project] Re: can we use Ansible to deploy applications to linux

2018-11-28 Thread Tony Chia
If you need to copy some files to the remote server, you can use the copy module https://docs.ansible.com/ansible/2.6/modules/copy_module.html If you need to make some configuration changes, you can use the template module https://docs.ansible.com/ansible/latest/modules/template_module.html

[ansible-project] can we use Ansible to deploy applications to linux

2018-11-28 Thread Nk Chitturi
Hello, I want to try using Ansible to publish the sln and copy to Linux deploy servers. please suggest me some way to use Ansible for my build and deployment process. thanks, Narmada -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

[ansible-project] Fwd: Us congress hearing of maan alsaan Money laundry قضية الكونغجرس لغسيل الأموال للمليادير معن الصانع

2018-11-28 Thread Kasem A
YouTube videos of U.S. Congress money laundering hearing of Saudi Billionaire " Maan Al sanea" with *bank of America* and The owner of Saad Hospital and Schools in the Eastern Province in *Saudi Arabia* and the Chairman of the Board of Directors of Awal Bank in *Bahrain*

[ansible-project] Re: How to copy certain files in different servers (different location )to another remote server using ansible.

2018-11-28 Thread Sanjay Thakur
Since, you are using *delegate_to: *so, you should check SSH connection or DNS resolution from IHS server to all 5 different application servers to make sure you can connect to all app servers. On Wednesday, November 28, 2018 at 2:05:37 PM UTC+5:30, vowner wrote: > > hello Experts, > > How to

Re: [ansible-project] Re: Connect via NOT a bastion jump host

2018-11-28 Thread Mark Zhitomirski
On Wed, Nov 28, 2018 at 1:43 PM wrote: > Of course, thanks for asking; > My company has HP Network Automation (HP NA) host which provides universal > access to all network devices. It behaves like a jump host, but, not SSH > jump host. We ssh to it, authenticate and then get onto local CLI -

[ansible-project] Re: From RHEL not able to connect to windows VM

2018-11-28 Thread Tony Chia
By default ansible will use ssh connection which tries to connect to port 22 even if the target host is windows. In order to tell ansible to connect using winrm which uses port 5985(non-ssl)/5986(ssl), you have to add these variable/settings to your inventory file ansible_port: 5986

Re: [ansible-project] Re: How to copy certain files in different servers (different location )to another remote server using ansible.

2018-11-28 Thread vowner
Hello Velumani, I tried by your suggestion, but getting below error. but ssh is enabled to all target servers from controller machine but here its getting failed.. not sure the exact reason. [root@vwjts good]# ansible-playbook copycerts3.yml PLAY [copy the certificates to the IHS server]

[ansible-project] how can change or add multiple path to "ansible python module location" variable?

2018-11-28 Thread Alex Penazzi
after developing a dynamic inventory script in python3 that requires 3rd party modules installed in a different path (from ansible site-package) I realised that ansible is not able to import them (I guess because the variable mentioned in the subject does not include that path). I would need

[ansible-project] From RHEL not able to connect to windows VM

2018-11-28 Thread Suma P
Hi Team , I am trying to do a POC on Ansible first time.I am using RHEL as a master and Windows 2012 as a client .Installed ansible 2.7 in RHEL and winrm in windows and done inventory entries in RHEL . i am getting below error.Kindly help .. *ERROR* [root@Amaster group_vars]# ansible web -i

[ansible-project] Re: Parameterize an array for vars_files, can't seem to template i.e. lookup/split

2018-11-28 Thread powcarz
Hi all I have the very same issue, trying to include a pattern of files. I was also expecting the following to work vars_files: "{{ query('fileglob', 'mydir/vars/want_these_*.yml')}}" but I am getting the same error. Did you manage to find a workaround? For me the include_vars module is not

Re: [ansible-project] Re: How to copy certain files in different servers (different location )to another remote server using ansible.

2018-11-28 Thread Indian Velumani
Hi, Edit your hosts file like this /etc/Ansible/hosts [servers] A1 A2 A3 A4 A5 then: --- - name: copy the certificates to the IHS server hosts: servers tasks: - name: Transfer file from JTS to IHS synchronize: src: /opt/IBM/myapp/security/file2.crt dest:

[ansible-project] Can't decrypt SSH key to execute ansible commands from remote Jenkins host

2018-11-28 Thread maayeti
Good morning, I have one Jenkins instance from which I need to issue ansible commands & playbooks, ansible master being on another dedicated machine. In my jenkins builds I execute Ansible playbooks using "Send files or execute commands over ssh" build step. I know that the "Send files or

[ansible-project] win_copy in windows 7 issue

2018-11-28 Thread Sushanta Das
Hi Experts, I am facing following error message when trying to copy a .exe file of size 500MB using win_scp module. [WARNING]: FATAL ERROR DURING FILE TRANSFER: HTTPSConnectionPool(host='172.17.11.112', port=5986): Read timed out. (read timeout=120) *Target Machine:* Windows 7 SP1 with

Re: [ansible-project] Re: Connect via NOT a bastion jump host

2018-11-28 Thread vladan . milosevic . private
Of course, thanks for asking; My company has HP Network Automation (HP NA) host which provides universal access to all network devices. It behaves like a jump host, but, not SSH jump host. We ssh to it, authenticate and then get onto local CLI - which is specialised for managing the database of

Re: [ansible-project] Ansible constructs incorrect ssh

2018-11-28 Thread Mark Zhitomirski
Hi! My very limited knowledge of Ansible says it needs SFTP or at least SCP subsystems on the controlled side. Your company firewall allows only running ssh interactively - most probably it's not sufficient for Ansible. M. On Wed, Nov 28, 2018 at 6:49 AM Easy King wrote: > My firm's policy has

Re: [ansible-project] Re: Connect via NOT a bastion jump host

2018-11-28 Thread Mark Zhitomirski
can you kindly present your case? It's not easy to see what you are trying and where it fails. Regards, Mark On Tue, Nov 27, 2018 at 7:58 PM wrote: > As far as I have seen, it is not trivial - looks like although plugin for > network_cli is selected, the paramiko_ssh plugin is used to handle

[ansible-project] Re: Variable in "body" parameter of "uri" module

2018-11-28 Thread Ilya Ulis
Ok, I have found a solution. First of all, for some bug in Ambari I have to use raw body format and no json. So I have changed the body_format to json and appended "Content-Type": "text/plain" to the headers parameter. Now my headers parameter looks like: headers: '{"X-Requested-By":"ambari",

[ansible-project] Re: Notify with import or include not working

2018-11-28 Thread Claudio Soprano
No hints about this problem ? Include_task or import_task doesn't notify handlers, if i include the task directly in the playbook it works, but this is not the way to reuse tasks in multiple playbooks. So any hints or ideas are welcomed Claudio On Friday, November 9, 2018 at 3:26:36 PM

[ansible-project] Re: How to copy certain files in different servers (different location )to another remote server using ansible.

2018-11-28 Thread rpachi via Ansible Project
I think you can use fetch option which is available in Ansible. On Wednesday, November 28, 2018 at 2:05:37 PM UTC+5:30, vowner wrote: > > hello Experts, > > How to copy certain files in different servers (different location )to > another remote server using ansible. > > for example i have 5

[ansible-project] Ansible Development (methods skip in Ansible modules)

2018-11-28 Thread rpachi via Ansible Project
Hey Experts, I have written Ansible module. I am using it in multiple places. at times our software won't give output for the first time. so when we use retry option, our software gives output on 2nd or 3rd attempt. so when Ansible is retrying for 2nd or 3rd time, it will retry the entire

[ansible-project] How to copy certain files in different servers (different location )to another remote server using ansible.

2018-11-28 Thread vowner
hello Experts, How to copy certain files in different servers (different location )to another remote server using ansible. for example i have 5 application servers (A1,A2, A3, A4, A5), from theser servers i need to copy 2 files (file1.xml and file2.jks) location of file1.xml for all 5

[ansible-project] Re: pickup hostname and create self signed certificate

2018-11-28 Thread visar
Hello Bharath, Thanks a lot.. it worked.. appreciate your help here... On Wednesday, November 28, 2018 at 8:38:39 AM UTC+5:30, Bharath Kumar wrote: > > Please try the below. > > --- > hosts: IHS > gather_facts: yes > > tasks: > > - name: Create Self Signed Certificate for IHS > >

Re: [ansible-project] unarchive is not skipping if the folder already exists

2018-11-28 Thread visar
Hello Bharath, Thanks for your suggestion and i tried with below play and it didnt get succeed. play _ --- - name: extract the packages hosts: localhost,CCM gather_facts: no tasks: - name: Ensure the folder exists! file: path: /opt/mypack1 state: