Re: [ansible-project] Multi threading support in Ansible

2020-06-04 Thread Jagadeeshkumar Dittakavi
Thank you Matt for the detailed and quick reply.. Much appreciated the support from the community. On Friday, June 5, 2020 at 12:29:30 AM UTC+5:30, Matt Martz wrote: > > Yes, it would utilize the threading library in Python. The GIL is a > primary cause to the CPU restrictions. Our main

Re: [ansible-project] aws community edition and collection

2020-06-04 Thread Jordan Borean
> > You've identified one of the many annoying parts of collections. You need > a special directory structure and you can't install from git in an editable > manner. Admittedly you are right about the special directory structure but it's pretty trivial to install it from git in an editable

Re: [ansible-project] aws community edition and collection

2020-06-04 Thread James Cassell
On Thu, Jun 4, 2020, at 8:37 PM, Sydo Luciani wrote: > The only option that I can think of: > pip install https://github.com/ansible/ansible/archive/devel.tar.gz > git clone https://github.com/ansible-collections/community.aws.git > cp community.aws/plugins/modules/my_module.py

Re: [ansible-project] aws community edition and collection

2020-06-04 Thread Sydo Luciani
The only option that I can think of: pip install https://github.com/ansible/ansible/archive/devel.tar.gz git clone https://github.com/ansible-collections/community.aws.git cp community.aws/plugins/modules/my_module.py ~/.ansible/plugins/modules/ edit ~/.ansible/plugins/modules/my_module.py and

Re: [ansible-project] aws community edition and collection

2020-06-04 Thread Sydo Luciani
Thank you Matt, that worked, eventhough the collection is behind the github repository. Any recommendation or guidance on setting up development environment will be highly appreciated. I did follow below document to set up development environment, but considering changes in ansible repository

[ansible-project] Re: Use Ansible to Install SharePoint Server Updates

2020-06-04 Thread Jordan Borean
If the task is trying to install updates then you are typically restricted by Windows over a network logon like WinRM. The way around this that Ansible provides is the become [1]. This turns the logon type to an interactive logon which is allowed to install Windows updates just like you can

Re: [ansible-project] aws community edition and collection

2020-06-04 Thread Matt Martz
Collections are not pip installable. Instead you want to do: pip install https://github.com/ansible/ansible/archive/devel.tar.gz ansible-galaxy collection install amazon.aws On Thu, Jun 4, 2020 at 4:32 PM Sydo Luciani wrote: > Thank you for quick reply. > > What is the procedure to install

Re: [ansible-project] aws community edition and collection

2020-06-04 Thread Sydo Luciani
Thank you for quick reply. What is the procedure to install Ansible version 10 along with amazon.aws and community.aws I was able to install Ansible version 10 from repository: pip install git+https://github.com/ansible/ansible.git but getting error installing modules from community.aws: pip

Re: [ansible-project] Syntax errors with Jinja2 control structures in tasks file

2020-06-04 Thread Brian Coca
That is because that is not a feature of Ansible. Ansible parses the files using a YAML loader, then it does use jinja2 internally for templating, but only on SOME of the values in the data structure returned by YAML. -- Brian Coca -- You received this message because you are

[ansible-project] Syntax errors with Jinja2 control structures in tasks file

2020-06-04 Thread Alexander Z
Hi Ansible community, I am observing syntax error on attempt to use Jinja2 control structures in the tasks file: *Code* /opt/ansible/roles/network/tasks/network.yml: > {% if publicavailable|default(False) == False and public|default("") == "" > and datacenter != "XXX" and datacenter != "YYY"

Re: [ansible-project] Need info on creating V2P through Ansible.

2020-06-04 Thread venkat ramu
We have few vm in hyper-v (win 10)and want those VM to convert and install on laptops. presently we are capturing it as a wim and then installing it on the laptop. This is a manual process and I want to convert it to automation using an orchestrator tool. Thanks, Venkat On Thu, Jun 4, 2020 at

Re: [ansible-project] Multi threading support in Ansible

2020-06-04 Thread Matt Martz
Yes, it would utilize the threading library in Python. The GIL is a primary cause to the CPU restrictions. Our main process that orchestrates all of the task executions is already heavily CPU bound, so adding additional threads to the same core can cause a decrease in performance. Assuming we

Re: [ansible-project] Multi threading support in Ansible

2020-06-04 Thread Jagadeeshkumar Dittakavi
Thank you for the prompt reply.. Just a curious question: Is the threading work that is underway based on python threads or pthreads or any other threading mechanism? As you mentioned that the threading model is not going to be performant, was the reason being the python's GIL? On Friday,

Re: [ansible-project] Multi threading support in Ansible

2020-06-04 Thread Matt Martz
The only current process model is forking. There has been some work done to add a threaded process model, but there are some large hurdles to overcome. In practice, it is not necessarily more performant, and in many cases it was less performant, as it causes more CPU contention on a single core

[ansible-project] Multi threading support in Ansible

2020-06-04 Thread Jagadeeshkumar Dittakavi
I am a newbie to ansible but I got to explore how to run a tasks in parallel by spawing a thread for each task instead of a process. My requirement is to run the playbook on my localhost and there is no remote task execution needed. I also would like to wait for all threads to complete before I

[ansible-project] Sync module delete option not working

2020-06-04 Thread Ankit
Hello All, I am trying to sync all files and directories between two directories however for some reason, *delete* option is not working. Following is my task, this works properly except when some directory is deleted fro source, the same is not deleted in destination even thought both

[ansible-project] ALv2 reports odd data in ansible_distribution and ansible_os_family

2020-06-04 Thread 'Thomas Kern' via Ansible Project
We have just begun to use Ansible to manage some ALv2 instances in AWS. We manage RHEL 6/7, CentOS 6/7, OEL 6/7 in our home networks without problems. We have a playbook that gathers facts from servers and updates a local MySQL database. When this playbook runs against an ALv2 instance in AWS,

Re: [ansible-project] Need info on creating V2P through Ansible.

2020-06-04 Thread Dick Visser
What does this process look like? On Thu, 4 Jun 2020 at 15:35, venkat ramu wrote: > > Please let me know is it possible to convert virtual machine (hyper-v) to > physical using ansible? > > Thanks, > Venkat > > -- > You received this message because you are subscribed to the Google Groups >

[ansible-project] Running Ruby 2.6 from /etc/profile.d via Ansible Playbook in RHEL 7

2020-06-04 Thread harry devine
I have a role I'm testing that will install Redmine (www.redmine.org) on to a RHEL 7.8 machine. Redmine requires Ruby >= 2.3. So I'm installing Ruby 2.6.2 via the rhel-server-rhscl-7-rpms repository. If I log into the machine manually and check the Ruby version, its 2.6.2. However, when I

[ansible-project] Need info on creating V2P through Ansible.

2020-06-04 Thread venkat ramu
Please let me know is it possible to convert virtual machine (hyper-v) to physical using ansible? Thanks, Venkat -- 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

Re: [ansible-project] Add new line “\n” character to Ansible set_fact variable

2020-06-04 Thread Dick Visser
On Thu, 4 Jun 2020 at 14:07, Shifa Shaikh wrote: > > Dick Hi, > > That was a typo; however, the problem remains!! Writing to a file is all good > with newline while writing to email body does not translate "\n" as new line > !! Could this be a bug? Kindly suggest. Just tried it out and it

Re: [ansible-project] Add new line “\n” character to Ansible set_fact variable

2020-06-04 Thread Shifa Shaikh
Dick Hi, That was a typo; however, the problem remains!! Writing to a file is all good with newline while writing to email body does not translate "\n" as new line !! Could this be a bug? Kindly suggest. On Thu, Jun 4, 2020 at 3:37 PM Dick Visser wrote: > On Thu, 4 Jun 2020 at 10:50, Shifa

Re: [ansible-project] Add new line “\n” character to Ansible set_fact variable

2020-06-04 Thread Shifa Shaikh
@Dick Hi, That was a typo the problem remains writing to a file is all good with newlines while writing to email body does not translate "\n" as new line !! Could this be a bug ? On Thu, Jun 4, 2020 at 3:37 PM Dick Visser wrote: > On Thu, 4 Jun 2020 at 10:50, Shifa Shaikh wrote: > > > > I see

Re: [ansible-project] Add new line “\n” character to Ansible set_fact variable

2020-06-04 Thread Dick Visser
On Thu, 4 Jun 2020 at 10:50, Shifa Shaikh wrote: > > I see the problem is different than the direction we are debugging. > > When i write the variable to a file i see new lines but when the variable > assigned to email body it does not interpolate the new line instead prints > '\n' > >

Re: [ansible-project] Add new line “\n” character to Ansible set_fact variable

2020-06-04 Thread Shifa Shaikh
I see the problem is different than the direction we are debugging. When i write the variable to a file i see new lines but when the variable assigned to email body it does not interpolate the new line instead prints '\n' - copy content: "{{ mailbody }}" dest:

[ansible-project] Use Ansible to Install SharePoint Server Updates

2020-06-04 Thread Raikhan Mussin
Hello! My name is Raikhan. Maybe someone used Ansible to install Microsoft updates? We configured Ansible to install Microsoft updates, and this works successfully for all updates, except for *SharePoint Server 2013 updates*. When we run playbook to install SharePoint Server updates - nothing

Re: [ansible-project] Add new line “\n” character to Ansible set_fact variable

2020-06-04 Thread Stefan Hornburg (Racke)
On 6/4/20 8:54 AM, Shifa Shaikh wrote: > I tried multiline too as below, but that too fails > >        mailbody: | >          "{{ mailbody | default('') + 'PROFILE_NAME: ' + PROFILE_NAME }}" + > "\n" >          "{{ 'SERVER_NAME: ' + SERVER_NAME }}" > Please try: mailbody: | {{ mailbody |

Re: [ansible-project] Issue while parsing Complex Regular expression in YAML file

2020-06-04 Thread Vladimir Botka
The backslash must be escaped too (\\). For example, - debug: msg: OK loop: [' ', "'", '\', '"', '!', '}'] when: item is match(context_regex) vars: context_regex: '^[a-zA-Z0-9-+.#$%&~*/=?^_ ''\\"!]$' gives ok: [localhost] => (item= ) => {

Re: [ansible-project] Issue while parsing Complex Regular expression in YAML file

2020-06-04 Thread Vladimir Botka
On Wed, 3 Jun 2020 22:46:37 -0700 (PDT) Pawan Kumar wrote: > '^[a-zA-Z0-9-+.#$%&~*\/=?^_ '\"\\!]{9,430}$' Try this '^[a-zA-Z0-9-+.#$%&~*/=?^_''\"!]{9,430}$' In "single-quoted style" only the single-quote must be escaped ('') https://yaml.org/spec/1.2/spec.html#id2788097 For example

Re: [ansible-project] Add new line “\n” character to Ansible set_fact variable

2020-06-04 Thread Shifa Shaikh
I tried multiline too as below, but that too fails mailbody: | "{{ mailbody | default('') + 'PROFILE_NAME: ' + PROFILE_NAME }}" + "\n" "{{ 'SERVER_NAME: ' + SERVER_NAME }}" Output: ['"PROFILE_NAME: SPROD01" + "[file://\\n"\n]\\n"\n"SERVER_NAME: SPROD01SRV01"\n',

Re: [ansible-project] Add new line “\n” character to Ansible set_fact variable

2020-06-04 Thread Stefan Hornburg (Racke)
On 6/4/20 7:21 AM, Shifa Shaikh wrote: > Stephan Hi,  > > The article does not discuss newline inside parenthesis `{{` inside a > variable definition. That is where I have no clue. Hello Shifa, parenthesis are fine inside multiline YAML. Regards Racke > > On Thursday, June 4, 2020