Re: [ansible-project] Getting a message if register failed inside a task

2020-03-05 Thread Vladimir Botka
On Thu, 5 Mar 2020 22:09:49 -0800 (PST)
דודו דודו  wrote:

> I have a task that create a folder on HDFS storage. 
> If the folder exists I wish to show a message
> 
> - hosts: gw
>   become: true
>   become_user: hdfs
>   tasks:
>- name: create folder in HDFS
>  shell: hadoop dfs -mkdir /tmp/dudu
>  ignore_errors: yes
>  register: result
>  when: result is failed
>  fail:
>msg: folder exists 

It's not possible to use two modules (shell and fail) in one task. There are
couple of scenarios how to handle this case.

1) Show a message and fail (fatal)

   tasks:
- name: create folder in HDFS
  command: hadoop dfs -mkdir /tmp/dudu
  ignore_errors: yes
  register: result
- fail:
msg: folder exists 
  when: result is failed

2) Show a message and continue

   tasks:
- name: create folder in HDFS
  command: hadoop dfs -mkdir /tmp/dudu
  ignore_errors: yes
  register: result
- debug:
msg: folder exists 
  when: result is failed

3) Execute the command if the folder does not exist else skip the command,
   show a message and continue. Optionally change "debug" to "fail".

   tasks:
- name: create folder in HDFS
  command:
cmd: hadoop dfs -mkdir /tmp/dudu
creates: /tmp/dudu
  ignore_errors: yes
  register: result
- debug:
msg: "{{ result.stdout }}"
  when: not result.changed

Next options would be to use "block". See "Error Handling In Playbooks"
https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#error-handling-in-playbooks

As a sidenote, quoting from "shell – Execute shell commands on targets"
https://docs.ansible.com/ansible/latest/modules/shell_module.html#notes

  "If you want to execute a command securely and predictably, it may be
  better to use the command module instead. Best practices when writing
  playbooks will follow the trend of using command unless the shell module is
  explicitly required..."

quoting from "command – Execute commands on targets"
https://docs.ansible.com/ansible/latest/modules/command_module.html#notes

  "If you want to run a command through the shell (say you are using <, >, |,
  etc), you actually want the shell module instead. Parsing shell
  metacharacters can lead to unexpected commands being executed if quoting is
  not done correctly so it is more secure to use the command module when
  possible."
--

HTH,

-vlado

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20200306075453.2ee45c34%40gmail.com.


pgp20UUgWCW0l.pgp
Description: OpenPGP digital signature


[ansible-project] Getting a message if register failed inside a task

2020-03-05 Thread דודו דודו
HI, 

I have a task that create a folder on HDFS storage. 
If the folder exists I wish to show a message



- hosts: gw
  become: true
  become_user: hdfs
  tasks:
   - name: create folder in HDFS
 shell: hadoop dfs -mkdir /tmp/dudu
 ignore_errors: yes
 register: result
 when: result is failed
 fail:
   msg: folder exists 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/cf057ff7-8a50-47a4-86c4-b03551431180%40googlegroups.com.


Re: [ansible-project] Ansible output customize

2020-03-05 Thread Parveen Datt
Hi JYL,

Here is what i mean. 


TASK [debug] 
***

ok: [192.168.56.50] => (item= 00:48:30 up 2 min,  1 user,  load average: 
0.05, 0.06, 0.03) => {

"msg": " 00:48:30 up 2 min,  1 user,  load average: 0.05, 0.06, 0.03"

}

ok: [192.168.56.50] => (item=4.1.12-124.36.4.el7uek.x86_64) => {

"msg": "4.1.12-124.36.4.el7uek.x86_64"

}



Can we customize above output something like below

TASK [debug] 
***


"msg": "Server Uptime is -> [' 00:50:34 up 4 min,  1 user,  load 
average: 0.01, 0.04, 0.03']"


"msg": "Server Kernel is --> ['4.1.12-124.36.4.el7uek.x86_64']"








On Tuesday, March 3, 2020 at 12:55:40 PM UTC-8, Jean-Yves LENHOF wrote:
>
> Hi, 
>
> What is nicely formatted ? 
>
> Please show on an example what you want 
>
> Regards, 
>
> JYL 
>
> Le 03/03/2020 à 21:42, Parveen Datt a écrit : 
> > Hi Team 
> > 
> > I have written a playbook and using debug variable we are reading the 
> output in multiple play. Is there any way we can customize the output of 
> each registered variable and print it nicely formatted . Any suggestion 
> would be appreciated 
> > 
> > Thx 
> > 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a2a59ad5-fcea-4d84-8f09-ec954da750cf%40googlegroups.com.


[ansible-project] Need help construct a complex HTML using Jinja template.

2020-03-05 Thread Shifa Shaikh
Experts Hi,

I have a variable file that has a set of flowers, colors, and countries. 

# cat vars/DASHBOARD_vars.yaml
---
myarch:
  - COLOR:
name: blue,white,black,green
  - FLOWER:
name: rose,jasmine
  - COUNTRY:
name: Japan,Germany,France


  
I wish to create one HTML file each, thus 1 HTML for all colors, 1 HTML 
file for all flowers and 1 HTML for all countries. Below is what i expect 
how my colors HTML file should look like.




blue
white
black
green






DR











http://localhost/sample;> 
http://localhost/sample;> 

http://localhost/sample;> 






PROD
  
  
  
  





Likewaise flowers HTML would look like below:





rose
jasmine






DR









http://localhost/sample;> 
http://localhost/sample;> 






PROD
  
  





and similarly one HTML for countries.

I guess I need to use ansible's template feature to construct these HTML 
files.

Below is my playbook where I FLOWER able to read the variable files in 
order.

# cat dashboard.yml
- name: Play 1
  hosts: localhost
  tasks:
   - name: Load a variable file"
 include_vars:
   file: "vars/DASHBOARD_vars.yaml"




   - name: Declare array for IPs
 include_tasks: "{{ playbook_dir }}/dashboard_inner.yml"
 loop: "{{ myarch }}"
 loop_control:
   loop_var: myresult


# cat dashboard_inner.yml
---
- name: Declare here
  include_tasks: "{{ playbook_dir }}/dashboard_inner_inner.yml"
  loop: "{{ myresult.name.split(',') }}"
  
# cat dashboard_inner_inner.yml
---
  - block:
  - template:
  src: "templates/dashboard_body.html.j2"
  dest: "dashboard/dashboard_body_{{ item }}.html"
  - debug:
  msg: "HERE IS:{{ item }}"



  
When I run it creates HTML files for each component however, I'm not sure 
how my "templates/dashboard_body.html.j2" should be constructed to get me 
the desired output?

A couple of pointers to consider while construction the HTML is 

1. bgcolor: 


bgcolor changes for each table i.e for flowers, colors and countries each 
will have three different colors.

2. 
if "white" folder has bad.txt files say /tmp/white/bad.txt returns true 
then below  should be populated 

http://localhost/sample;> 


else the below one should be





Output of my run:

# ansible-playbook -i "all" dashboard.yml




PLAY [Play 1] 
*


TASK [Gathering Facts] 

ok: [localhost]


TASK [Load a variable file"] 
**
ok: [localhost]


TASK [Declare array for IPs] 
**
included: /root/test/dashboard_inner.yml for localhost
included: /root/test/dashboard_inner.yml for localhost


TASK [Declare here] 
***
included: /root/test/dashboard_inner_inner.yml for localhost
included: /root/test/dashboard_inner_inner.yml for localhost
included: /root/test/dashboard_inner_inner.yml for localhost
included: /root/test/dashboard_inner_inner.yml for localhost


TASK [template] 
***
changed: [localhost]


TASK [debug] 
**
ok: [localhost] => {
"msg": "HERE IS:blue"
}


TASK [template] 
***
changed: [localhost]


TASK [debug] 
**
ok: [localhost] => {
"msg": "HERE IS:white"
}


TASK [template] 
***
changed: [localhost]


TASK [debug] 
**
ok: [localhost] => {
"msg": "HERE IS:black"
}


TASK [template] 

[ansible-project] Re: Calling powershell function via Ansible

2020-03-05 Thread Jesse Lyon
Jordan,

The methodology I was following was "if it worked through ise, why's this not 
pass it properly?", I knew I was doing something wrong, I just didn't know what 
yet.

I'll give this a shot in the morning and report back.

After 12 punches on the card of "Jordan saves the day" do you earn a prize? 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f49ca391-1281-4af6-b462-872d7c5f8bbf%40googlegroups.com.


[ansible-project] New Ansible release 2.8.10

2020-03-05 Thread Matt Clay
Hi all- we're happy to announce that the general release of Ansible 2.8.10 
is
now available!


How do you get it?
--

$ pip install ansible==2.8.10 --user

The tar.gz of the release can be found here:

* 2.8.10
  https://releases.ansible.com/ansible/ansible-2.8.10.tar.gz
  SHA256: 72449a3dde4142c79ef607dc6a2a02995b1c96f75d0ef5beffd00f3dfa6f93a6


What's new in 2.8.10


This release is a maintenance release fixing a regression in the OpenStack 
modules in the 2.8.9 release yesterday. The full
changelog is at:

* 2.8.10
  
https://github.com/ansible/ansible/blob/stable-2.8/changelogs/CHANGELOG-v2.8.rst


What's the schedule for future maintenance releases?


Future maintenance releases will occur approximately every 3 weeks.  So 
expect
the next one around 2020-03-26.


Porting Help


We've published a porting guide at
https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.8.html 
to
help migrate your content to 2.8.


If you discover any errors or if any of your working playbooks break when 
you
upgrade to 2.8.10, please use the following link to report the regression:

  https://github.com/ansible/ansible/issues/new/choose

In your issue, be sure to mention the Ansible version that works and the one
that doesn't.

Thanks!

-Matt Clay

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/07fcaa31-746e-4fa3-bd17-89cd127fa6bf%40googlegroups.com.


[ansible-project] Re: Calling powershell function via Ansible

2020-03-05 Thread Jordan Borean
When you call powershell.exe with -File you cannot run multiple commands 
after that, it's designed to run a script with potential arguments. You can 
even see in the error from powershell it thinks the file it needs to run is 
`C:\Scripts\USERNAME\dfsadd_func.ps1;' (with the semicolon) so that's why 
it is saying the extension is wrong.

If you are trying to run a function that is sourced from a file do the 
following

- name: Create DFS links
  win_shell: |
. C:\Scripts\USERNAME\dfsadd_func.ps1  # dot source the file to load 
the functions
dfsadd -junction Apps -obj_name toast -prd_vserver PROD -dr_vserver DR 
-prd_state 
online -dr_state offline

Please bear in mind the double hop problem with WinRM where you will be 
unable to talk to downstream servers in your task unless you use something 
like become or your auth is CredSSP or Kerberos with credential delegation 
enabled.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/efdc8a5e-0262-4ca8-913b-bbbecc97cf75%40googlegroups.com.


Re: [ansible-project] Ansible Split JSON Return

2020-03-05 Thread Kai Stian Olstad

On 05.03.2020 15:52, David Foley wrote:

Have the Following Playbook Which Returns the following

ok: [localhost] => {
"mdb.json": [


The [ is telling us that mdb.json is a list, the fist element in a list 
i 0.



{
"mac-address": "xx:xx:xx:xx:xx"
}
]
}





  - debug:
  msg: "{{ mdb.json.split(':') }}"

What i would like to Return is just

 "msg":  "xx:xx:xx:xx:xx"


That would be {{ mdb.json.0['mac-address'] }}

because of the dash in mac-address you need to use [] notation and not 
the dot notation on that one.



--
Kai Stian Olstad

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f3d3bf2f4bc46bb693a3d8c348cf3e4b%40olstad.com.


Re: [ansible-project] File operations failing on shared file system #67410

2020-03-05 Thread Kai Stian Olstad

On 04.03.2020 22:34, Stephen Gevers wrote:
I still haven't figured out why this justifies the developer's 
conclusion.


Because it has nothing to do with Ansible and everything to do with your 
OS and network protocol you are using to your NAS.

Ansible just ask the OS and report the answer it gets.

If your are using NFS the default is async mode(some OS/distros change 
this), then the server is lying to the client, saying a file is created 
before it's created.
This is done to increase throughput, you can set it to sync but it will 
probably reduce the performance.


--
Kai Stian Olstad

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c5ae5bcac4d448b58bd0a601c6031448%40olstad.com.


[ansible-project] Re: Build a file based on list only when another part of list matches ansible_hostname

2020-03-05 Thread John
I was able to figure it out.  I just had to think about it a bit more:

- name: Extract Errors
 lineinfile:
   line: "{{ item.ErrorMessage }}"
   path: "{{ error_log }}"
   insertafter: EOF
   create: yes
   state: present
 loop: "{{ csv_content.list }}"
 when: item.Host is search(ansible_hostname)


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2ccbe263-8116-43a1-b095-f63e5216f353%40googlegroups.com.


[ansible-project] Build a file based on list only when another part of list matches ansible_hostname

2020-03-05 Thread John
I need to create a file based on the output of the csv_content variable.  
Specifically I want to extract the ErrorMessage only, but the caveat is 
that I want only the errors associated with ansible_hostname.  That way on 
each server I am extracting only the ErrorMessages that are relevant to 
that server

Sample output from list:

ok: [3.220.248.61] => {
"csv_content": {
"changed": false,
"dict": {},
"failed": false,
"list": [
{
"Customer": "MyCustomerName",
"ErrorCount": "7563",
"ErrorMessage": "consider creating an index or changing the 
query",
"Host": "MyCustomerName-prod-author1",
"InstanceId": "i-0d0a56f41f9042c4f",
"PossibleReason": "Missing search index that causes large 
repository traversal causing performance issues due to high disk I/O",
"RecommendedActions": "Contact customizer to create 
required search index -  ",
"Severity": "MAJOR",
"Source": "/mnt/crx/author/crx-quickstart/logs/error.log"
},
{
"Customer": "MyCustomerName",
"ErrorCount": "27882",
"ErrorMessage": "consider creating an index or changing the 
query",
"Host": "MyCustomerName-prod-httpd1",
"InstanceId": "i-087c38748d150c4fa",
"PossibleReason": "Missing search index that causes large 
repository traversal causing performance issues due to high disk I/O",
"RecommendedActions": "Contact customizer to create 
required search index -  ",
"Severity": "MAJOR",
"Source": "/mnt/crx/publish/crx-quickstart/logs/error.log"
},
]
}
}

My attempt:

- name: Extract Errors
  lineinfile:
line: "{{ item.ErrorMessage }}"
path: "{{ error_log }}"
insertafter: EOF
create: yes
state: present
  loop: "{{ csv_content.list }}"
  when: csv_content.list.item.Host is search(ansible_hostname) 
< Doesn't work and I don't even know if I can do something 
similar to this in a loop


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8bb11930-aa37-4838-ab57-4e2f8a62650e%40googlegroups.com.


[ansible-project] Creating a new F5 policy rule

2020-03-05 Thread Sharon Day
I'm trying to create a policy rule using a loop to add multiple rules.  I'm 
getting an error and I have tried several scenarios but can't figure out.

here's what I have.

Here are the vars:

rules:
  A3-JL1L-test.local:
- rl_name: test.local
  actions:
   - type: forward
 pool: "A3-JL1L-test.local_443_pool"
  conditions:
   - type: http_uri
 path_begins_with: /test_path


Here's the module from the playbook:

- name: Add multiple rules to the new policy
  bigip_policy_rule:
provider: "{{ cli }}"
policy: "{{ item }}_{{ vips[item].port }}_policy"
name: "{{ rules[item].rl_name }}"
actions: "{{ rules[item].actions }}"
conditions: "{{ rules[item].conditions }}"
state: "{{ defaults.state }}"
  loop: "{{ rules.keys() }}"

Here's the error:

fatal: [JTCLANDEVLB525003.entmconn.site]: FAILED! => {
"msg": "The task includes an option with an undefined variable. The 
error was: 'list object' has no attribute 'rl_name'\n\nThe error appears to 
be in 
'/automation/ansible/playbooks/f5/Test/app_deployment/tasks/ssl_bridging_l7.yml':
 
line 172, column 7, but may\nbe elsewhere in the file depending on the 
exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: 
Add multiple rules to the new policy\n  ^ here\n"
}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/34c135ce-6b01-41ac-ac31-b063045bc3ae%40googlegroups.com.


Re: [ansible-project] Know if a variable come from extra_vars

2020-03-05 Thread Kai Stian Olstad

On 03.03.2020 11:53, Quentin Aveno wrote:

I think it's not possible


Correct.


--
Kai Stian Olstad

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ba89e6bd9db6bbbc47f6db4703b65e1c%40olstad.com.


[ansible-project] Calling powershell function via Ansible

2020-03-05 Thread Jesse Lyon
I have a function, it works perfectly if I run it directly from my target 
server.

powershell.exe  -ExecutionPolicy ByPass -file 
"C:\Scripts\USERNAME\dfsadd_func.ps1"; dfsadd -junction Apps -obj_name 
toast -prd_vserver PROD -dr_vserver DR -prd_state online -dr_state offline

With success seen below.
Path   TargetPath  State  
 ReferralPriorityClass ReferralPriorityRank
   --  -  
 - 
\\DOMAIN.net\Apps\toast \\PROD\Apps\toast Online  sitecost-normal   0  
 
\\DOMAIN.net\Apps\toast \\DR\Apps\toast Offline sitecost-normal   0


Through ansible
I've tried both win_shell and win_command like so
  - name: Create DFS links
#win_command: powershell.exe -ExecutionPolicy ByPass -file 
C:\Scripts\USERNAME\dfsadd_func.ps1; dfsadd "{{ vol_junction }} {{ obj_name 
}} {{ prd_vserver }} {{ dr_vserver }} {{ prd_state }} {{ dr_state }}"
win_shell: powershell -file C:\Scripts\USERNAME\dfsadd_func.ps1';' 
dfsadd " -junction {{ vol_junction }} -obj_name {{ obj_name }} -prd_vserver 
{{ prd_vserver }} -dr_vserver {{ dr_vserver }} -prd_state {{ prd_state }} 
-dr_state {{ dr_state }}"


With varying combinations of how to include that semi-colon, how to *not 
*include 
the semi-colon, whatever.

Mostly, to this result.

fatal: [HOSTNAME.DOMAIN.net]: FAILED! => {
"changed": true,
"cmd": "powershell -file C:\\Scripts\\USERNAME\\dfsadd_func.ps1';' 
dfsadd \" -junction Apps -obj_name toast -prd_vserver PROD -dr_vserver DR 
-prd_state online -dr_state offline\"",
"delta": "0:00:00.968771",
"end": "2020-03-05 07:36:02.440099",
"msg": "non-zero return code",
"rc": 1,
"start": "2020-03-05 07:36:01.471327",
"stderr": "Processing -File 'C:\\Scripts\\USERNAME\\dfsadd_func.ps1;' 
failed because the file does not have a '.ps1' extension. Specify a valid 
Windows PowerShell script file name, and then try again.",
"stderr_lines": [
"Processing -File 'C:\\Scripts\\USERNAME\\dfsadd_func.ps1;' failed 
because the file does not have a '.ps1' extension. Specify a valid Windows 
PowerShell script file name, and then try again."
],
"stdout": "Windows PowerShell \r\nCopyright (C) 2016 Microsoft 
Corporation. All rights reserved.\r\n\r\n",
"stdout_lines": [
"Windows PowerShell ",
"Copyright (C) 2016 Microsoft Corporation. All rights reserved.",
""
]
}


I don't have much hair left to remove, so I can't pull much more out, 
anyone have any good advice?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1d2255a0-4344-4693-956f-772d2ee231bb%40googlegroups.com.


[ansible-project] Re: Ansible 2.8 hanging with bash command

2020-03-05 Thread John
I am using the following.  Not sure if there is a better solution:

- name: Gather error reports in background
  shell: |
  while read line; do
grep -i "$line" "{{ log_source }}"* | uniq  > "{{ dest_dir 
}}/{{ ansible_hostname }}-$line.txt"
  done < "{{ error_log }}"
  failed_when: false
  args:
executable: /bin/bash
  async: 180
  poll: 0
  register: gather_sleeper

- name:  Check on report gathering -- This can take a while
  async_status:
jid: "{{ gather_sleeper.ansible_job_id }}"
  register: job_result
  until: job_result.finished
  retries: 37
  failed_when: false


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5c9f7260-372b-4ef1-8cd5-ac78339d9e39%40googlegroups.com.


[ansible-project] Re: Ansible deployng VM and transfering and execute shell script on remote host

2020-03-05 Thread Julio Cesar Caraca
Hi Racke ,

I moved the script to /tmp directory and also changed permission to 777. 

In the playbook I just put: 

- name: testing
script: /tmp/shell.sh

The virtual machine is created with success and I figured out that the 
shell script is executed with success but in the localhost (ansible 
machine) instead of remote vm.


[image: Ansible_error_1.PNG]


[image: Ansible_error_2.PNG]



Do you know some way to hit the new virtual machine instead of localhost?


Kindly Regards,

Julio




Em quarta-feira, 4 de março de 2020 15:46:43 UTC-3, Julio Cesar Caraca 
escreveu:
>
> Hi Guys,
>
> I got a playbook to deploy virtual machines and it´s working very well. 
>
> And now I´m trying to transfer and execute a shell script during the 
> deploy of virtual machine but I´m getting many issues when changing the 
> playbook.
>
> Has anyone been faced this need as well?
>
> Cheers,
>
> Julio
>
>  
>
>
>
>
-- 

AVISO LEGAL:
Esta mensagem, incluindo seus anexos, é destinada 
exclusivamente para a(s) pessoa(s) a quem é dirigida, podendo conter 
informação confidencial e/ou privilegiada. Se você não for destinatário 
desta mensagem, desde já fica notificado de abster-se de utilizar a 
informação contida nesta mensagem de qualquer forma, sujeitando o infrator 
às penas da lei, notificar o remetente e eliminar o seu conteúdo de forma 
definitiva. Informações transmitidas por e-mail podem ser alteradas por 
terceiros, não havendo garantia de que sua integridade foi mantida e que 
esteja livre de vírus, interceptação ou interferência, não podendo ser 
imputada qualquer responsabilidade à TOTVS com relação ao seu conteúdo.



LEGAL NOTICE:
This message, including its attachments, is intended 
exclusively for the people to whom it is addressed, and may contain 
confidential and/or privileged information. If you are not a recipient of 
this message, you are hereby notified to refrain from using the information 
contained in this message, subjecting the infringer to the penalties of the 
law. Information transmitted by e-mail may be changed by third parties, and 
there is no guarantee that its integrity has been maintained and that it is 
free of viruses, interception or interference, and no responsibility will 
be attributed to TOTVS in relation to its content.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e06e91a6-a788-41fd-96eb-19509968f796%40googlegroups.com.


[ansible-project] Need to construct complex HTML file from Jinja template

2020-03-05 Thread Shifa Shaikh
Experts Hi,

I have a variable file that has a set of flowers, colors, and countries. 

# cat vars/DASHBOARD_vars.yaml
---
myarch:
  - name: brown,white,black,green
  - name: rose,jasmine
  - name: Japan,Germany,France

  
I wish to create one HTML file each, thus 1 HTML for all colors, 1 HTML 
file for all flowers and 1 HTML for all countries. Below is what i expect 
how my colors HTML file should look like.




brown
white
black
green




DR









http://localhost/sample;> 
http://localhost/sample;> 

http://localhost/sample;> 




PROD
  
  
  
  




Likewaise flowers HTML would look like below:





rose
jasmine




DR







http://localhost/sample;> 
http://localhost/sample;> 




PROD
  
  




and similarly one HTML for countries.

I guess I need to use ansible's template feature to construct these HTML 
files.

Below is my playbook where I was able to read the variable files in order.

# cat dashboard.yml
- name: Play 1
  hosts: localhost
  tasks:
   - name: Load a variable file"
 include_vars:
   file: "vars/DASHBOARD_vars.yaml"


   - name: Declare array for IPs
 include_tasks: "{{ playbook_dir }}/dashboard_inner.yml"
 loop: "{{ myarch }}"
 loop_control:
   loop_var: myresult


# cat dashboard_inner.yml
---
- name: Declare here
  include_tasks: "{{ playbook_dir }}/dashboard_inner_inner.yml"
  loop: "{{ myresult.name.split(',') }}"
  
# cat dashboard_inner_inner.yml
---
  - block:
  - template:
  src: "templates/dashboard_body.html.j2"
  dest: "dashboard/dashboard_body_{{ item }}.html"
  - debug:
  msg: "HERE IS:{{ item }}"

  
When I run it creates HTML files for each component however, I'm not sure 
how my "templates/dashboard_body.html.j2" should be constructed to get me 
the desired output?

A couple of pointers to consider while construction the HTML is 

1. bgcolor:  bgcolor changes for each table i.e 
for flowers, colors and countries each will have three different colors.

2. 
if "white" folder has bad.txt files say /tmp/white/bad.txt returns true 
then below  should be populated 

http://localhost/sample;> 

else the below one should be




Output of my run:

# ansible-playbook -i "all" dashboard.yml


PLAY [Play 1] 
*


TASK [Gathering Facts] 

ok: [localhost]


TASK [Load a variable file"] 
**
ok: [localhost]


TASK [Declare array for IPs] 
**
included: /root/test/dashboard_inner.yml for localhost
included: /root/test/dashboard_inner.yml for localhost


TASK [Declare here] 
***
included: /root/test/dashboard_inner_inner.yml for localhost
included: /root/test/dashboard_inner_inner.yml for localhost
included: /root/test/dashboard_inner_inner.yml for localhost
included: /root/test/dashboard_inner_inner.yml for localhost


TASK [template] 
***
changed: [localhost]


TASK [debug] 
**
ok: [localhost] => {
"msg": "HERE IS:brown"
}


TASK [template] 
***
changed: [localhost]


TASK [debug] 
**
ok: [localhost] => {
"msg": "HERE IS:white"
}


TASK [template] 
***
changed: [localhost]


TASK [debug] 
**
ok: [localhost] => {
"msg": "HERE IS:black"
}


TASK [template] 
***
changed: [localhost]



[ansible-project] Ansible 2.8 hanging with bash command

2020-03-05 Thread John
I have a task that searches logs for specific errors in various logs (up to 
7 days worth of logs).  When searching through just one log I never had an 
issue, but when searching through the 7 logs (used a wildcard to accomplish 
this), sometimes Ansible goes to lunch and doesn't recover.  It just sits 
there like it is still executing.  We have let it run for many hours in 
that state just to make sure.  I think it has a lot to do with timing 
and/or the size of the files (and the number of errors found int he 
files).  Wondering if there is a more robust way to address this so that it 
will either not hang, continue on after a certain point (maybe a 5 minute 
timeout) or be more efficient (such as searching logs and writing to a file 
with an ansible module I don't know of)?  

- name: Gather error reports
  shell: |
  while read line; do
grep -i "$line" "{{ log_source }}"* | uniq  > "{{ dest_dir 
}}/{{ ansible_hostname }}-$line.txt"
  done < "{{ error_log }}"
  failed_when: false
  args:
executable: /bin/bash


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/af6c88f5-5270-4c57-839e-0205547b31b7%40googlegroups.com.


[ansible-project] Re: Ansible Split JSON Return

2020-03-05 Thread Cade Lambert
Ok, try this then:

- debug:
  msg: "{{ item.mac-address }}"
  loop: "{{ mdb.json }}"

On Thursday, March 5, 2020 at 10:45:03 AM UTC-5, David Foley wrote:
>
> -
> - hosts: localhost
>   gather_facts: false
>   tasks:
>   - name: Getting Mac Address 
> uri: 
>   url: http://.com 
>   return_content: yes
>
> register: mdb
>   - debug:
>   msg: "{{ mdb.json }}"
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0fcc3dce-712d-45df-a1d4-95c3848493db%40googlegroups.com.


[ansible-project] Re: Ansible Split JSON Return

2020-03-05 Thread David Foley
-
- hosts: localhost
  gather_facts: false
  tasks:
  - name: Getting Mac Address 
uri: 
  url: http://.com 
  return_content: yes

register: mdb
  - debug:
  msg: "{{ mdb.json }}"


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c598fea5-0c18-44b4-a72e-8ffa20d402c8%40googlegroups.com.


[ansible-project] Re: Ansible Split JSON Return

2020-03-05 Thread Cade Lambert
What's your plabook look like? You'll probably have to loop through your 
JSON results as it looks like it's a list.

On Thursday, March 5, 2020 at 10:34:40 AM UTC-5, David Foley wrote:
>
> When i do Both 
>
> "{{ mdb.json.mac-address }}"
> "{{ mdb.json.split(':')[1:6] | join(':') }}"
>
> It returns 
>
> fatal: [localhost]: FAILED! => {"msg": "The task includes an option with 
> an undefined variable. The error was: 'list object' has no attribute 
> 'mac'\n\nThe error appears to be in '/srv/Ansible/mdb.yaml': line 8, column 
> 5, but may\nbe elsewhere in the file depending on the exact syntax 
> problem.\n\nThe offending line appears to be:\n\nregister: mdb\n  - 
> debug:\n^ here\n"}
>
> fatal: [localhost]: FAILED! => {"msg": "The task includes an option with 
> an undefined variable. The error was: 'list object' has no attribute 
> 'split'\n\nThe error appears to be in '/srv/Ansible/mdb.yaml': line 8, 
> column 5, but may\nbe elsewhere in the file depending on the exact syntax 
> problem.\n\nThe offending line appears to be:\n\nregister: mdb\n  - 
> debug:\n^ here\n"}
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7aa61efa-1cf0-4604-9b7a-bd30d6349c9f%40googlegroups.com.


[ansible-project] Re: Ansible Split JSON Return

2020-03-05 Thread David Foley
When i do Both 

"{{ mdb.json.mac-address }}"
"{{ mdb.json.split(':')[1:6] | join(':') }}"

It returns 

fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an 
undefined variable. The error was: 'list object' has no attribute 
'mac'\n\nThe error appears to be in '/srv/Ansible/mdb.yaml': line 8, column 
5, but may\nbe elsewhere in the file depending on the exact syntax 
problem.\n\nThe offending line appears to be:\n\nregister: mdb\n  - 
debug:\n^ here\n"}

fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an 
undefined variable. The error was: 'list object' has no attribute 
'split'\n\nThe error appears to be in '/srv/Ansible/mdb.yaml': line 8, 
column 5, but may\nbe elsewhere in the file depending on the exact syntax 
problem.\n\nThe offending line appears to be:\n\nregister: mdb\n  - 
debug:\n^ here\n"}


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a32f963e-ae87-45ac-b930-0fbd78e46de6%40googlegroups.com.


[ansible-project] Re: Ansible Split JSON Return

2020-03-05 Thread Cade Lambert
Something like this would work I believe:

"{{ mdb.json.split(':')[1:6] | join(':') }}"

Also, could you not just reference it directly by using "{{ 
mdb.json.mac-address }}"?

On Thursday, March 5, 2020 at 9:52:52 AM UTC-5, David Foley wrote:
>
> Have the Following Playbook Which Returns the following
>
> ok: [localhost] => {
> "mdb.json": [
> {
> "mac-address": "xx:xx:xx:xx:xx"
> }
> ]
> }
>
>
> --
> - hosts: localhost
>   gather_facts: false
>   tasks:
>   - name: Getting Mac Address 
> uri: url="http://.com?field=mac-address; return_content=yes
> register: mdb
>   - debug:
>   msg: "{{ mdb.json.split(':') }}"
>
> What i would like to Return is just 
>
>  "msg":  "xx:xx:xx:xx:xx"
>
> But Split doesn't seem to work 
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0776c9b4-d5fd-439c-bdb9-ac1ef03425db%40googlegroups.com.


Re: [ansible-project] Re: Testing Authentication with Ansible

2020-03-05 Thread Cade Lambert
Circling back around to this.  What do you mean by crawlers?  Any you'd 
recommend.

I did notice the URI module can pass credentials to a site, but when I try 
that it works with any credentials, even non-existent or incorrect 
credentials, so I'm not totally sure what that is actually doing because it 
can't be correctly authenticating.

On Thursday, December 5, 2019 at 11:17:40 AM UTC-5, Stefan Hornburg (Racke) 
wrote:
>
> On 12/5/19 3:20 PM, Adam wrote: 
> > We've been experimenting using Selenium for things like this.  It's not 
> simple and will probably make your head hurt (it 
> > makes mine hurt), but it is very flexible for things like this. 
>
> There are numerous crawlers around that can be used for that task if you 
> can't stomach Selenium. 
>
> Regards 
> Racke 
>
> > 
> > On Wednesday, December 4, 2019 at 3:16:13 PM UTC-5, Cade Lambert wrote: 
> > 
> > We have a CMS web application that we'd like to ensure is up and 
> accessible.  I was using the URI module to check 
> > the login page for a proper response code, but I'd like to go a step 
> further and test that a set of credentials can 
> > actually log into the site.  I've tried messing around with some of 
> the examples on the URI module documentation to 
> > no avail.  Has anyone done something like this before? 
> > 
> > -- 
> > 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...@googlegroups.com   ansible-project+unsubscr...@googlegroups.com >. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/ansible-project/27263f7e-0bda-46d7-a9a4-64641b06bb33%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/ansible-project/27263f7e-0bda-46d7-a9a4-64641b06bb33%40googlegroups.com?utm_medium=email_source=footer>.
>  
>
>
>
> -- 
> Ecommerce and Linux consulting + Perl and web application programming. 
> Debian and Sympa administration. Provisioning with Ansible. 
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/668ba131-18c8-4e56-8177-aa919d83e933%40googlegroups.com.


[ansible-project] Ansible Split JSON Return

2020-03-05 Thread David Foley
Have the Following Playbook Which Returns the following

ok: [localhost] => {
"mdb.json": [
{
"mac-address": "xx:xx:xx:xx:xx"
}
]
}


--
- hosts: localhost
  gather_facts: false
  tasks:
  - name: Getting Mac Address 
uri: url="http://.com?field=mac-address; return_content=yes
register: mdb
  - debug:
  msg: "{{ mdb.json.split(':') }}"

What i would like to Return is just 

 "msg":  "xx:xx:xx:xx:xx"

But Split doesn't seem to work 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bbc6205a-89fe-452d-ad71-ef72a3714e0a%40googlegroups.com.


Re: [ansible-project] Re: Unable to access variables from host_vars dir however can access the same variables when specified in roles/defaults/mail.yml

2020-03-05 Thread anil gouranna
i think you will have to provide the path using vars_files in the playbook
and then run.

On Wed, Mar 4, 2020 at 9:09 PM Vishal Bobade 
wrote:

> @sagarmujumale - any idea on this?
>
> On Wednesday, March 4, 2020 at 7:19:44 PM UTC+5:30, Vishal Bobade wrote:
>>
>>
>> TASK [ansible-manage-lvm : manage_lvm | creating new LVM volume group(s)] 
>> **
>>  [0;31mfatal: [grafana]: FAILED! => {"msg": "'config_lv_name' is undefined"} 
>> [0m
>>  [0;31m [0m
>>
>>
>>
>>
>>
>> I am gettin the above error when I am trying to create and procure lvm
>> stuff on my new environment. I want to mention all the variables as a part
>> of host_vars like below:
>>
>> # lvm variablesvg_name: "VolGroup01"config_lv_name: "LogVol10"data_lv_name: 
>> "LogVol11"lvm_disk_name: "/dev/nvme2n1"config_mntp: "/opt/tools"data_mntp: 
>> "/data"config_lv_size: "50G"data_lv_size: "100G"
>>
>>
>>
>> I am trying to use them as below :
>>
>>
>> lvm_groups:  - vgname: "{{ vg_name }}"disks:   - "{{ 
>> lvm_disk_name }}"create: truelvnames:  - lvname: "{{ 
>> config_lv_name }}"size: "{{ config_lv_size }}"
>> create: true  ## Mention "false" in case of lvm removal
>> filesystem: xfsmount: truemntp: "{{ config_mntp }}"  
>> - lvname: "LogVol11"size: "{{ data_lv_size 
>> }}"create: true  ## Mention "false" in case of lvm removal   
>>  filesystem: xfsmount: truemntp: "{{ data_mntp 
>> }}"manage_lvm: true
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Wednesday, March 4, 2020 at 7:10:36 PM UTC+5:30, Sagar Mujumale wrote:
>>>
>>> Whats the problem? where do you stuck. Please post more information.
>>>
>>> On Wednesday, 4 March 2020 18:54:29 UTC+5:30, Vishal Bobade wrote:

 I have created multiple inventory files specific to dev , qa etc env.
 under inventory dir.

 inventory/dev.domain.net.yml

 Any suggestions, would help as I am stucked here..


 --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/35253e9a-06a1-4392-ba40-4747ae755187%40googlegroups.com
> 
> .
>


-- 
Thanks And Regards
   Anil A Gouranna

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CALEfPTWFkim3SZF3NExddf8hK2BQjk%2BUk5JuONpKuRc4Nsw3tw%40mail.gmail.com.


Re: [ansible-project] Re: Ansible deployng VM and transfering and execute shell script on remote host

2020-03-05 Thread Stefan Hornburg (Racke)
On 3/5/20 2:14 PM, Julio Cesar Caraca wrote:
> Hi Racke,
> 
> Thanks for the answer!
> 
> All configuration that I´ve been trying is based on this documentation:
> https://docs.ansible.com/ansible/latest/modules/shell_module.html
> 
> Although I´m getting error the virtual machine is been created but without 
> the copy and execution of shell script:
> 
> Ansible_error_1.PNG
> 
> 
> I just added the following lines in the playbook:
> 
>  - name: testing copy
>     copy:
>       src: /root/shell.sh
>       dest: /tmp
>     delegate_to: localhost
>   - name: testing execute
>     shell: /tmp/shell.sh

The error message states clearly "permission denied". Also there is no point 
the shell module for simple commands
as explained in the documentation.

Regards
Racke

> 
> This is my playbook:
> 
> Ansible_error_2.PNG
> 
> 
> 
> A simple shell script only for testing:
> 
> Ansible_error_3.PNG
> 
> 
> 
> 
> Really appreciate any help.
> 
> 
> Thanks in advance!
> 
> Julio
> 
>  
> 
> 
> 
> 
> 
> Em quarta-feira, 4 de março de 2020 15:46:43 UTC-3, Julio Cesar Caraca 
> escreveu:
> 
> Hi Guys,
> 
> I got a playbook to deploy virtual machines and it´s working very well. 
> 
> And now I´m trying to transfer and execute a shell script during the 
> deploy of virtual machine but I´m getting many
> issues when changing the playbook.
> 
> Has anyone been faced this need as well?
> 
> Cheers,
> 
> Julio
> 
>  
> 
> 
> 
> 
> 
> AVISO LEGAL: Esta mensagem, incluindo seus anexos, é destinada exclusivamente 
> para a(s) pessoa(s) a quem é dirigida,
> podendo conter informação confidencial e/ou privilegiada. Se você não for 
> destinatário desta mensagem, desde já fica
> notificado de abster-se de utilizar a informação contida nesta mensagem de 
> qualquer forma, sujeitando o infrator às
> penas da lei, notificar o remetente e eliminar o seu conteúdo de forma 
> definitiva. Informações transmitidas por e-mail
> podem ser alteradas por terceiros, não havendo garantia de que sua 
> integridade foi mantida e que esteja livre de vírus,
> interceptação ou interferência, não podendo ser imputada qualquer 
> responsabilidade à TOTVS com relação ao seu conteúdo.
> 
> LEGAL NOTICE: This message, including its attachments, is intended 
> exclusively for the people to whom it is addressed,
> and may contain confidential and/or privileged information. If you are not a 
> recipient of this message, you are hereby
> notified to refrain from using the information contained in this message, 
> subjecting the infringer to the penalties of
> the law. Information transmitted by e-mail may be changed by third parties, 
> and there is no guarantee that its integrity
> has been maintained and that it is free of viruses, interception or 
> interference, and no responsibility will be
> attributed to TOTVS in relation to its content.
> 
> -- 
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/15111899-3261-4628-b9aa-112a88305809%40googlegroups.com
> .


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/09a634a5-775a-451a-55e7-f46d703b7166%40linuxia.de.


signature.asc
Description: OpenPGP digital signature


[ansible-project] Re: Ansible deployng VM and transfering and execute shell script on remote host

2020-03-05 Thread Julio Cesar Caraca
Hi Racke,

Thanks for the answer!

All configuration that I´ve been trying is based on this documentation:
https://docs.ansible.com/ansible/latest/modules/shell_module.html

Although I´m getting error the virtual machine is been created but without 
the copy and execution of shell script:

[image: Ansible_error_1.PNG]

I just added the following lines in the playbook:

 - name: testing copy
copy:
  src: /root/shell.sh
  dest: /tmp
delegate_to: localhost
  - name: testing execute
shell: /tmp/shell.sh

This is my playbook:

[image: Ansible_error_2.PNG]


A simple shell script only for testing:

[image: Ansible_error_3.PNG]



Really appreciate any help.


Thanks in advance!

Julio

 





Em quarta-feira, 4 de março de 2020 15:46:43 UTC-3, Julio Cesar Caraca 
escreveu:
>
> Hi Guys,
>
> I got a playbook to deploy virtual machines and it´s working very well. 
>
> And now I´m trying to transfer and execute a shell script during the 
> deploy of virtual machine but I´m getting many issues when changing the 
> playbook.
>
> Has anyone been faced this need as well?
>
> Cheers,
>
> Julio
>
>  
>
>
>
>
-- 

AVISO LEGAL:
Esta mensagem, incluindo seus anexos, é destinada 
exclusivamente para a(s) pessoa(s) a quem é dirigida, podendo conter 
informação confidencial e/ou privilegiada. Se você não for destinatário 
desta mensagem, desde já fica notificado de abster-se de utilizar a 
informação contida nesta mensagem de qualquer forma, sujeitando o infrator 
às penas da lei, notificar o remetente e eliminar o seu conteúdo de forma 
definitiva. Informações transmitidas por e-mail podem ser alteradas por 
terceiros, não havendo garantia de que sua integridade foi mantida e que 
esteja livre de vírus, interceptação ou interferência, não podendo ser 
imputada qualquer responsabilidade à TOTVS com relação ao seu conteúdo.



LEGAL NOTICE:
This message, including its attachments, is intended 
exclusively for the people to whom it is addressed, and may contain 
confidential and/or privileged information. If you are not a recipient of 
this message, you are hereby notified to refrain from using the information 
contained in this message, subjecting the infringer to the penalties of the 
law. Information transmitted by e-mail may be changed by third parties, and 
there is no guarantee that its integrity has been maintained and that it is 
free of viruses, interception or interference, and no responsibility will 
be attributed to TOTVS in relation to its content.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/15111899-3261-4628-b9aa-112a88305809%40googlegroups.com.


[ansible-project] New Ansible releases 2.9.6 and 2.8.9

2020-03-05 Thread Matt Clay
Hi all- we're happy to announce that the general release of Ansible 2.9.6 
and
2.8.9 are now available!


How do you get it?
--

$ pip install ansible==2.9.6 --user
or
$ pip install ansible==2.8.9 --user

The tar.gz of the releases can be found here:

* 2.9.6
  https://releases.ansible.com/ansible/ansible-2.9.6.tar.gz
  SHA256: 59cf3a0781f89992d1dae5205b07e802dff1db205eebd238de9e503b62b8cbc9
* 2.8.9
  https://releases.ansible.com/ansible/ansible-2.8.9.tar.gz
  SHA256: ad6b3e6b2b4c399b70e73830d5d431ade0a59f38542967dcf3028051eb80552a


What's new in 2.9.6 and 2.8.9
-

These releases are maintenance releases containing numerous bugfixes. The 
full
changelogs are at:

* 2.9.6
  
https://github.com/ansible/ansible/blob/stable-2.9/changelogs/CHANGELOG-v2.9.rst
* 2.8.9
  
https://github.com/ansible/ansible/blob/stable-2.8/changelogs/CHANGELOG-v2.8.rst


What's the schedule for future maintenance releases?


Future maintenance releases will occur approximately every 3 weeks.  So 
expect
the next one around 2020-03-26.


Porting Help


We've published a porting guide at
https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.9.html 
to
help migrate your content to 2.9.


If you discover any errors or if any of your working playbooks break when 
you
upgrade to 2.9.6, please use the following link to report the regression:

  https://github.com/ansible/ansible/issues/new/choose

In your issue, be sure to mention the Ansible version that works and the one
that doesn't.

Thanks!

-Matt Clay

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f92d2c84-725f-43c5-93a7-0cd9d45b68b0%40googlegroups.com.