[ansible-project] ERROR! 'win_updates' is not a valid attribute for a Play. Pls suggest

2018-10-13 Thread Abhishek Mishra
ERROR! 'win_updates' is not a valid attribute for a Play

My yaml file

-

  name: "Install all security updates with automatic reboots"

  win_updates:

category_names:

  - SecurityUpdates

reboot: true



ERROR msg while running


[asadmin@ansible Playbook]$ ansible-playbook winupdate.yaml -i 
windowsinventory.txt

ERROR! 'win_updates' is not a valid attribute for a Play


The error appears to have been in 
'/home/asadmin/test_project/Playbook/winupdate.yaml': line 2, column 3, but 
may

be elsewhere in the file depending on the exact syntax problem.


The offending line appears to be:


-

  name: "Install all security updates with automatic reboots"

  ^ 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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/fbdbac99-2f41-49b8-99f9-bd23c9ec1ac6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: open command line installer by playbook

2018-10-13 Thread Varun Chopra
If you can do it through a shell script, you can use the same script in 
Ansible.

On Saturday, October 13, 2018 at 2:57:57 PM UTC+5:30, 
aakanks...@webdunia.net wrote:
>
> Hello,
>
> I have software, where I need to run ./install.bin command as a output it 
> open a command line installer to provide requested value of variables.
> How can I achieve this by ansible playbook.
>

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/156b6007-c9a3-4dd4-92d3-17c82640086f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] YAML line breaks (newlines) when performing lookups of files or templates

2018-10-13 Thread Dmitriy Panteleyev
I've been banging my head against this for two days.  Maybe I'm missing 
something.  When fetching a YAML file or template with lookup function, all 
the newlines are not preserved, but converted to '\n'.  This does not 
happen for other file types (like json).  Is this the expected behavior?  
Is there a way around it?

Examples follow:

given file 'test.yml'
json:
  - rigid
  - better for data interchange
yaml:
  - slim and flexible
  - better for configuration
object:
  key: value
  array:
- null_value:
- boolean: true
- integer: 1
paragraph: >
   Blank lines denote

   paragraph breaks
content: |-
   Or we
   can auto
   convert line breaks
   to save space

printing out a lookup: 
- debug:
msg: "{{ lookup('file', test.yml') }}"
 
results in:

> ok: [localhost] => {
> "msg": "json:\n  - rigid\n  - better for data interchange\nyaml:\n  - 
> slim and flexible\n  - better for configuration\nobject:\n  key: value\n  
> array:\n- null_value:\n- boolean: true\n- integer: 
> 1\nparagraph: >\n   Blank lines denote\n\n   paragraph breaks\ncontent: 
> |-\n   Or we\n   can auto\n   convert line breaks\n   to save space"
> }



On the other hand, given the same info in JSON ('test.json'):
{
  "json": [
"rigid",
"better for data interchange"
  ],
  "yaml": [
"slim and flexible",
"better for configuration"
  ],
  "object": {
"key": "value",
"array": [
  {
"null_value": null
  },
  {
"boolean": true
  },
  {
"integer": 1
  }
]
  },
  "paragraph": "Blank lines denote\nparagraph breaks\n",
  "content": "Or we\ncan auto\nconvert line breaks\nto save space"
}

and printing out the same lookup: 
- debug:
msg: "{{ lookup('file', test.json') }}"
 
results in:

> ok: [localhost] => {
> "msg": {
> "content": "Or we\ncan auto\nconvert line breaks\nto save space", 
> "json": [
> "rigid", 
> "better for data interchange"
> ], 
> "object": {
> "array": [
> {
> "null_value": null
> }, 
> {
> "boolean": true
> }, 
> {
> "integer": 1
> }
> ], 
> "key": "value"
> }, 
> "paragraph": "Blank lines denote\nparagraph breaks\n", 
> "yaml": [
> "slim and flexible", 
> "better for configuration"
> ]
> }
> }




















-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b4025b7e-c566-4113-b114-8ec0db1e01ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Packer to automate windows builds with Ansible

2018-10-13 Thread Rahamath Ulla
Hello, i am trying to autonate windiws server build with Packer and virtual 
box. While using ansible provisioner in packer, how amd where to mention the ip 
address of newly launched VM in virtual box. I read that ansible will generate 
host file dynamically but its not wirking. If anyone has acheived this, olease 
help to share.

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/13a33770-a5ff-4064-b1b2-40c170779552%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] open command line installer by playbook

2018-10-13 Thread aakanksha . jain
Hello,

I have software, where I need to run ./install.bin command as a output it 
open a command line installer to provide requested value of variables.
How can I achieve this by ansible playbook.

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bf785d53-1eb2-4fca-a668-007600cef710%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: WINRM CONNECTION ERROR: the specified credentials were rejected by the server

2018-10-13 Thread Johar K. Kwan
Thank you Jordan! 
I managed connect using Kerberos instead of using ssl. For ssl connection I 
think i need to create self signed cert as mention here 
http://www.hurryupandwait.io/blog/understanding-and-troubleshooting-winrm-connection-and-authentication-a-thrill-seekers-guide-to-adventure.
 

-- 
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 ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8e2ef280-64b2-4e30-99b3-a55f12d2dd42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.