Giter Site home page Giter Site logo

Comments (28)

jedelman8 avatar jedelman8 commented on August 16, 2024

Can you pull it down again and re-try? I just pushed a fix for another
issue.

Thanks,
Jason

On Mon, Jul 27, 2015 at 6:00 AM, dheerajpanyam [email protected]
wrote:

Hi ,

I am trying to generate the markdown for a custom module that i wrote, the
module follows the Ansible standards in documentation and i do not suspect
anything wrong here. It is creating a markdown with empty content ( just
the header and the sub-header). The module path etc is set correctly in my
playbook used to generate the markdown.

Please help

vagrant@vagrant-ubuntu-trusty-64:~/ansible-webdocs/ansible-webdocs$
ansible-playbook create-ansible-webdoc.yml -i
/home/vagrant/playbooks/inventory

PLAY [create local markdown doc]


TASK: [get docs and examples for modules]


ok: [localhost]

TASK: [build web/markdown ansible docs]


changed: [localhost]

PLAY RECAP


localhost : ok=2 changed=1 unreachable=0 failed=0

vagrant@vagrant-ubuntu-trusty-64:/ansible-webdocs/ansible-webdocs$ cd
web/
vagrant@vagrant-ubuntu-trusty-64:
/ansible-webdocs/ansible-webdocs/web$
vi ansiblefilesdoc.md
vagrant@vagrant-ubuntu-trusty-64:~/ansible-webdocs/ansible-webdocs/web$

Below is the markdown that got generated
Ansible module for Vistara Maintenance *Schedule a Vistara Maintenance

Window*

Requirements

  • See official Ansible docs

Modules


Created by Jason Edelman. February 2015.


Reply to this email directly or view it on GitHub
#2.

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

I pulled the latest version again and tried but still not generating the complete documentation. I have validated my custom module for the comments i added for the documentation using YAMLIint and it returned fine .

Regards
Dheeraj

from ansible-webdocs.

jedelman8 avatar jedelman8 commented on August 16, 2024

Can you post your module ? If you prefer not to post here, email it to me
at jedelman8 @ gmail dot com.

On Mon, Jul 27, 2015 at 8:24 AM, dheerajpanyam [email protected]
wrote:

I pulled the latest version again and tried but still not generating the
complete documentation. I have validated my custom module for the comments
i added for the documentation using YAMLIint and it returned fine .

Regards
Dheeraj


Reply to this email directly or view it on GitHub
#2 (comment)
.

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

Below is the YAML portion of the module , following it is the actual python module code which is implemented in a OO fashion .

#!/usr/bin/env python
import requests
import json
from datetime import datetime,timedelta
#from dateutil import tz

DOCUMENTATION = '''

module: Vistara_Maintenance
short_description: Schedule a Vistara Maintenenance window
description:

  • Schedules a Vistara Maintenance window for a specific set of devices/Device Groups with a starttime and endtime in the specified timezone
    version_added: "1.0"
    author: Dheeraj Panyam
    options:

    One or more of the following

    name:
    description:
    - Name for the maintenance
    required: false
    default: Created By Ansible
    description:
    description:
    - Describes what the maintenance is intended for
    required: false
    schedule_type:
    description:
    • Describes the maintenance type
      required: true
      aliases: ['type','maint_type']
      choices: ['One-Time']
      devices:
      description:
    • Comma seperated list of devices to be put to maintenance, one of the parameters devices or devicegroups need to be given as input
      required: false if devicegroups option is used
      aliases: ['dev']
      devicegroups:
      description:
    • Comma seperated list of device groups to be put to maintenance, one of the parameters devices or devicegroups need to be given as input
      required: false if devices option is used
      aliases: ['devgrp']
      start_time:
      description:
    • Specifies the start time for the maintenance window in the specified timezone
      required: true
      aliases: ['start']
      end_time:
      description:
    • Specifies the end time for the maintenance window in the specified timezone
      required: true
      aliases: ['end']
      timezone:
      description:
    • Specifies the timezone for the maintenance window
      required: true
      default: ['America/Los_Angeles']
      aliases: ['zone']
      client_id:
      description:
    • Specifies the tenant Id
      required: true
      '''

EXAMPLES = '''

Schedule a 30 min Vistara Maintenenance window containing 2 devicegroups and 3 devices for client Netenrich Internal in the IST timezone from 3pm to 3:30pm

  • vistara_maintenance: schedule_type:One-Time devices:HYDLPT326,HYDLPT104 devicegroups:'Test Group,test1' start_time:2015-06-01T23:15:00+0000 end_time:2015-06-01T15:30:00+0000 timezone:Asia/Calcutta client_id:client_2655

Schedule a 3hr 15min Vistara Maintenenance window for a desktop device in the Netenrich Internal domain from 6pm to 9:15pm

  • vistara_maintenance: schedule_type:One-Time devices:HYDPC010 start_time:2015-06-01T18:00:00+0000 end_time:2015-06-01T21:15:00+0000 timezone:Asia/Calcutta client_id:client_2655
    '''

from ansible-webdocs.

jedelman8 avatar jedelman8 commented on August 16, 2024

Can you please post it in a code block like so:

INSERT YOUR CODE HERE

This way, I can see the proper layout.

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

Sorry i realised it later that it was rendering the YAML code i pasted into a markdown , how do i post it in a code block?

Dheeraj

from ansible-webdocs.

jedelman8 avatar jedelman8 commented on August 16, 2024

Use the character to the right of the "1" on the keyboard, i.e. the backtick "`" like so:

Three backticks: "```" without the quotes, the paste your code/yaml, and then close it with three more backticks.

Also see this: https://help.github.com/articles/markdown-basics/#code-formatting

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

Thanks , i am a newbie to git below is the YAML portion of the Ansible module

DOCUMENTATION = '''
---
module: Vistara_Maintenance
short_description: Schedule a Vistara Maintenenance window
description:
 - Schedules a Vistara Maintenance window for a specific set of devices/Device Groups with a starttime and endtime in the specified timezone
version_added: "1.0"
author: Dheeraj Panyam
options:
# One or more of the following
  name:
    description:
      - Name for the maintenance 
    required: false 
    default: Created By Ansible
  description:
    description:
      - Describes what the maintenance is intended for
    required: false 
  schedule_type:
    description:
     - Describes the maintenance type 
    required: true
    aliases: ['type','maint_type']
    choices: ['One-Time']
  devices:
    description:
     - Comma seperated list of devices to be put to maintenance, one of the parameters devices or devicegroups need to be given as input 
    required: false if devicegroups option is used 
    aliases: ['dev']
  devicegroups:
    description:
     - Comma seperated list of device groups to be put to maintenance, one of the parameters devices or devicegroups need to be given as input 
    required: false if devices option is used 
    aliases: ['devgrp']
  start_time:
    description:
     - Specifies the start time for the maintenance window in the specified timezone 
    required: true
    aliases: ['start']
  end_time:
    description:
     - Specifies the end time for the maintenance window in the specified timezone 
    required: true
    aliases: ['end']
  timezone:
    description:
     - Specifies the timezone  for the maintenance window  
    required: true
    default: ['America/Los_Angeles']
    aliases: ['zone']
  client_id:
    description:
     - Specifies the tenant Id  
    required: true
'''     

EXAMPLES = '''
# Schedule a 30 min Vistara Maintenenance window containing 2  devicegroups and 3 devices for client Netenrich Internal in the IST timezone from 3pm to 3:30pm 
- vistara_maintenance: schedule_type:One-Time devices:HYDLPT326,HYDLPT104 devicegroups:'Test Group,test1' start_time:2015-06-01T23:15:00+0000 end_time:2015-06-01T15:30:00+0000 timezone:Asia/Calcutta client_id:client_2655

# Schedule a 3hr 15min Vistara Maintenenance window for a desktop device in the Netenrich Internal domain from 6pm to 9:15pm 
- vistara_maintenance: schedule_type:One-Time devices:HYDPC010 start_time:2015-06-01T18:00:00+0000 end_time:2015-06-01T21:15:00+0000 timezone:Asia/Calcutta client_id:client_2655
'''

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

Thanks , I pasted the code very much appreciate your quick responses and help.

Dheeraj

From: Jason Edelman [mailto:[email protected]]
Sent: Tuesday, July 28, 2015 5:03 PM
To: jedelman8/ansible-webdocs [email protected]
Cc: Dheeraj Panyam [email protected]
Subject: Re: [ansible-webdocs] Unable to generate documentation (#2)

Use the character to the right of the "1" on the keyboard, i.e. the backtick "`" like so:

Three backticks: "```" without the quotes, the paste your code/yaml, and then close it with three more backticks.

Also see this: https://help.github.com/articles/markdown-basics/#code-formatting


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-125566586.


Confidentiality And Disclaimer Notice

Please do not print this email unless it is absolutely necessary. The
information contained in this electronic message and any attachments to this
message are intended for the exclusive use of the addressee(s) and may contain
proprietary, confidential or privileged information. If you are not the intended
recipient, you should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately and destroy all copies of this message and any
attachments. WARNING: Computer viruses can be transmitted via email. The
recipient should check this email and any attachments for the presence of
viruses. The company accepts no liability for any damage caused by any virus
transmitted by this email. ……www.netenrich.com


from ansible-webdocs.

jedelman8 avatar jedelman8 commented on August 16, 2024

That's odd, it seems to work for me...make sure you know where you are saving the correct file :)

Foo

Bar


Requirements

  • TBD

Modules


Vistara_Maintenance

Schedule a Vistara Maintenenance window

  • Synopsis
  • Options
  • Examples

Synopsis

Schedules a Vistara Maintenance window for a specific set of devices/Device Groups with a starttime and endtime in the specified timezone

Options

Parameter required default choices comments
name no Created By Ansible Name for the maintenance
start_time yes Specifies the start time for the maintenance window in the specified timezone
devices false if devicegroups option is used Comma seperated list of devices to be put to maintenance, one of the parameters devices or devicegroups need to be given as input
schedule_type yes
  • One-Time
Describes the maintenance type
devicegroups false if devices option is used Comma seperated list of device groups to be put to maintenance, one of the parameters devices or devicegroups need to be given as input
end_time yes Specifies the end time for the maintenance window in the specified timezone
client_id yes Specifies the tenant Id
timezone yes [u'America/Los_Angeles'] Specifies the timezone for the maintenance window
description no Describes what the maintenance is intended for

Examples

# Schedule a 30 min Vistara Maintenenance window containing 2  devicegroups and 3 devices for client Netenrich Internal in the IST timezone from 3pm to 3:30pm
- vistara_maintenance: schedule_type:One-Time devices:HYDLPT326,HYDLPT104 devicegroups:'Test Group,test1' start_time:2015-06-01T23:15:00+0000 end_time:2015-06-01T15:30:00+0000 timezone:Asia/Calcutta client_id:client_2655

# Schedule a 3hr 15min Vistara Maintenenance window for a desktop device in the Netenrich Internal domain from 6pm to 9:15pm
- vistara_maintenance: schedule_type:One-Time devices:HYDPC010 start_time:2015-06-01T18:00:00+0000 end_time:2015-06-01T21:15:00+0000 timezone:Asia/Calcutta client_id:client_2655



Created by Network to Code, LLC
For:
2015

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

I am using the default output directory specified in the playbook , I changed the module path to point to the location where my modules are present

tasks:

- name: get docs and examples for modules


  ansible_docstring: path=/usr/share/ansible/monitoring/


  register: modules





- name: build web/markdown ansible docs


  template: src=templates/ansible-docs.j2 dest=web/ansiblefilesdoc.md

From: Jason Edelman [mailto:[email protected]]
Sent: Tuesday, July 28, 2015 5:32 PM
To: jedelman8/ansible-webdocs [email protected]
Cc: Dheeraj Panyam [email protected]
Subject: Re: [ansible-webdocs] Unable to generate documentation (#2)

That's odd, it seems to work for me...make sure you know where you are saving the correct file :)

Foo
Bar


Requirements

  • TBD

Modules

  • Vistara_Maintenance - schedule a vistara maintenenance window

Vistara_Maintenance

Schedule a Vistara Maintenenance window

  • Synopsis
  • Options
  • Examples

Synopsis

Schedules a Vistara Maintenance window for a specific set of devices/Device Groups with a starttime and endtime in the specified timezone

Options
Parameter

required

default

choices

comments

name

no

Created By Ansible

Name for the maintenance

start_time

yes

Specifies the start time for the maintenance window in the specified timezone

devices

false if devicegroups option is used

Comma seperated list of devices to be put to maintenance, one of the parameters devices or devicegroups need to be given as input

schedule_type

yes

  • One-Time

Describes the maintenance type

devicegroups

false if devices option is used

Comma seperated list of device groups to be put to maintenance, one of the parameters devices or devicegroups need to be given as input

end_time

yes

Specifies the end time for the maintenance window in the specified timezone

client_id

yes

Specifies the tenant Id

timezone

yes

[u'America/Los_Angeles']

Specifies the timezone for the maintenance window

description

no

Describes what the maintenance is intended for

Examples

Schedule a 30 min Vistara Maintenenance window containing 2 devicegroups and 3 devices for client Netenrich Internal in the IST timezone from 3pm to 3:30pm

  • vistara_maintenance: schedule_type:One-Time devices:HYDLPT326,HYDLPT104 devicegroups:'Test Group,test1' start_time:2015-06-01T23:15:00+0000 end_time:2015-06-01T15:30:00+0000 timezone:Asia/Calcutta client_id:client_2655

Schedule a 3hr 15min Vistara Maintenenance window for a desktop device in the Netenrich Internal domain from 6pm to 9:15pm

  • vistara_maintenance: schedule_type:One-Time devices:HYDPC010 start_time:2015-06-01T18:00:00+0000 end_time:2015-06-01T21:15:00+0000 timezone:Asia/Calcutta client_id:client_2655


Created by Network to Code, LLC
For:
2015


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-125574767.


Confidentiality And Disclaimer Notice

Please do not print this email unless it is absolutely necessary. The
information contained in this electronic message and any attachments to this
message are intended for the exclusive use of the addressee(s) and may contain
proprietary, confidential or privileged information. If you are not the intended
recipient, you should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately and destroy all copies of this message and any
attachments. WARNING: Computer viruses can be transmitted via email. The
recipient should check this email and any attachments for the presence of
viruses. The company accepts no liability for any damage caused by any virus
transmitted by this email. ……www.netenrich.com


from ansible-webdocs.

jedelman8 avatar jedelman8 commented on August 16, 2024

Please change the dest path to be the absolute path, i.e. /home/foo/bar/ansible-webdocs/ansible-webdocs/web/ansiblefilesdoc.md

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

Yes I am using the absolute path and running this playbook on a vagrant Ubuntu 14.04. I am using Ansible 1.8.4

Regards
Dheeraj

From: Jason Edelman [mailto:[email protected]]
Sent: Tuesday, July 28, 2015 5:44 PM
To: jedelman8/ansible-webdocs [email protected]
Cc: Dheeraj Panyam [email protected]
Subject: Re: [ansible-webdocs] Unable to generate documentation (#2)

Please change the dest path to be the absolute path, i.e. /home/foo/bar/ansible-webdocs/ansible-webdocs/web/ansiblefilesdoc.md


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-125579922.


Confidentiality And Disclaimer Notice

Please do not print this email unless it is absolutely necessary. The
information contained in this electronic message and any attachments to this
message are intended for the exclusive use of the addressee(s) and may contain
proprietary, confidential or privileged information. If you are not the intended
recipient, you should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately and destroy all copies of this message and any
attachments. WARNING: Computer viruses can be transmitted via email. The
recipient should check this email and any attachments for the presence of
viruses. The company accepts no liability for any damage caused by any virus
transmitted by this email. ……www.netenrich.com


from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

Hello Jason,

Yes i changed the path to absolute path for the markdown task in the playbook , this is how it looks like

tasks:

- name: get docs and examples for modules
  ansible_docstring: path=/usr/share/ansible/monitoring/
  register: modules

- name: build web/markdown ansible docs
  template: src=/home/vagrant/ansible-webdocs/templates/ansible-docs.j2 dest=/home/vagrant/ansible-webdocs/web/ansiblefilesdoc.md

from ansible-webdocs.

jedelman8 avatar jedelman8 commented on August 16, 2024

Can you run the playbook in verbose mode with the -v flag set and post the output?

ansible-playbook playbookname -v

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

Below is the playbook output run in verbose mode

vagrant@vagrant-ubuntu-trusty-64:~/ansible-webdocs$ ansible-playbook create-ansible-webdoc.yml -i /home/vagrant/playbooks/inventory -v

PLAY [create local markdown doc] **********************************************

TASK: [get docs and examples for modules] *************************************
ok: [localhost] => {"changed": false, "errors": ["vistara_maintenance.py", "vistara_maintenance_backup.py"], "results": []}

TASK: [build web/markdown ansible docs] ***************************************
ok: [localhost] => {"changed": false, "gid": 1000, "group": "vagrant", "mode": "0664", "owner": "vagrant", "path": "/home/vagrant/ansible-webdocs/web/ansiblefilesdoc.md", "size": 178, "state": "file", "uid": 1000}

PLAY RECAP ********************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0

vagrant@vagrant-ubuntu-trusty-64:~/ansible-webdocs$

from ansible-webdocs.

jedelman8 avatar jedelman8 commented on August 16, 2024

I made a minor tweak. Please do a git pull for the latest and try it again running with the -v set.

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

Hello Jason,
It is working now and generating the markdown, however there was an error in the playbook run. Guess it has something to do with the attributes related to my custom module

However one important thing is that the generated markdown does not have any entry for my custom module.

vagrant@vagrant-ubuntu-trusty-64:~/ansible-webdocs$ ansible-playbook create-ansible-webdoc.yml -i /home/vagrant/playbooks/inventory -v

PLAY [create local markdown doc] **********************************************

TASK: [get docs and examples for modules] *************************************
ok: [localhost] => {"changed": false, "errors": [null, "error-examples", null, "error-examples"], "results": [null, null]}

TASK: [build web/markdown ansible docs] ***************************************
fatal: [localhost] => {'msg': "AnsibleUndefinedVariable: One or more undefined variables: 'None' has no attribute 'short_description'", 'failed': True}
fatal: [localhost] => {'msg': "AnsibleUndefinedVariable: One or more undefined variables: 'None' has no attribute 'short_description'", 'failed': True}

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
to retry, use: --limit @/home/vagrant/create-ansible-webdoc.retry

localhost : ok=1 changed=0 unreachable=1 failed=0

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

Hello Jason,

I pulled the git module and reran the playbook. The documentation is getting generated but it doesn’t have any entries related to my module, I made sure the path for the modules is correct and absolute in the playbook.

Regards
Dheeraj

From: Jason Edelman [mailto:[email protected]]
Sent: Friday, July 31, 2015 10:40 PM
To: jedelman8/ansible-webdocs [email protected]
Cc: Dheeraj Panyam [email protected]
Subject: Re: [ansible-webdocs] Unable to generate documentation (#2)

I made a minor tweak. Please do a git pull for the latest and try it again running with the -v set.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-126754770.


Confidentiality And Disclaimer Notice

Please do not print this email unless it is absolutely necessary. The
information contained in this electronic message and any attachments to this
message are intended for the exclusive use of the addressee(s) and may contain
proprietary, confidential or privileged information. If you are not the intended
recipient, you should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately and destroy all copies of this message and any
attachments. WARNING: Computer viruses can be transmitted via email. The
recipient should check this email and any attachments for the presence of
viruses. The company accepts no liability for any damage caused by any virus
transmitted by this email. ……www.netenrich.com


from ansible-webdocs.

jedelman8 avatar jedelman8 commented on August 16, 2024

Did you get this working?

If not, try and clean up your examples. If you're using the one-line notation, try not including colons :. and wrap your long strings with quotes.

Do something like what is below..

EXAMPLES = '''
# Schedule a 30 min Vistara Maintenenance window containing 2  devicegroups and 3 devices for client Netenrich Internal in the IST timezone from 3pm to 3:30pm
- vistara_maintenance: schedule_type=One-Time devices=HYDLPT326,HYDLPT104 devicegroups='Test Group,test1' start_time="2015-06-01T23:15:00+0000" end_time="2015-06-01T15:30:00+0000" timezone="Asia/Calcutta" client_id="client_2655"
'''

I also made another minor change to see if this helps (so please do another git pull), but based on what you are seeing, the problems are with your example syntax.

You may want to try a really simple example like this:

EXAMPLES = '''
# Schedule a 30 min Vistara Maintenenance window containing 2  devicegroups and 3 devices for client Netenrich Internal in the IST timezone from 3pm to 3:30pm
- vistara_maintenance: schedule_type=One_Time 
'''

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

I remove the example section in my module and after re-syncing your git module I ran the playbook , the markdown is empty now

Below is the markdown file which got generated

Ansible FILES modules

Local copy of files modules


Requirements

  • See official Ansible docs

Modules



Created by Network to Code, LLC
For:
2015
~

Dheeraj

From: Jason Edelman [mailto:[email protected]]
Sent: Monday, August 03, 2015 5:33 PM
To: jedelman8/ansible-webdocs [email protected]
Cc: Dheeraj Panyam [email protected]
Subject: Re: [ansible-webdocs] Unable to generate documentation (#2)

Did you get this working?

If not, try and clean up your examples. If you're using the one-line notation, try not including colons :. and wrap your long strings with quotes.

Do something like what is below..

EXAMPLES = '''

Schedule a 30 min Vistara Maintenenance window containing 2 devicegroups and 3 devices for client Netenrich Internal in the IST timezone from 3pm to 3:30pm

  • vistara_maintenance: schedule_type=One-Time devices=HYDLPT326,HYDLPT104 devicegroups='Test Group,test1' start_time="2015-06-01T23:15:00+0000" end_time="2015-06-01T15:30:00+0000" timezone="Asia/Calcutta" client_id="client_2655"

'''

I also made another minor change to see if this helps (so please do another git pull), but based on what you are seeing, the problems are with your example syntax.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-127210532.


Confidentiality And Disclaimer Notice

Please do not print this email unless it is absolutely necessary. The
information contained in this electronic message and any attachments to this
message are intended for the exclusive use of the addressee(s) and may contain
proprietary, confidential or privileged information. If you are not the intended
recipient, you should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately and destroy all copies of this message and any
attachments. WARNING: Computer viruses can be transmitted via email. The
recipient should check this email and any attachments for the presence of
viruses. The company accepts no liability for any damage caused by any virus
transmitted by this email. ……www.netenrich.com


from ansible-webdocs.

jedelman8 avatar jedelman8 commented on August 16, 2024

Try not removing it, but include this:

EXAMPLES = '''
# Schedule a 30 min Vistara Maintenenance window
- vistara_maintenance: schedule_type=One_Time 
'''

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

I tried but still same result , below is the EXAMPLES section I added

EXAMPLES = '''

Schedule a 30 min Vistara Maintenance window containing 2 device groups and 3 devices for client Netenrich Internal in the IST time zone from 3pm to 330pm

'''

Regards
Dheeraj

From: Jason Edelman [mailto:[email protected]]
Sent: Monday, August 03, 2015 6:00 PM
To: jedelman8/ansible-webdocs [email protected]
Cc: Dheeraj Panyam [email protected]
Subject: Re: [ansible-webdocs] Unable to generate documentation (#2)

Try not removing it, but include this:

EXAMPLES = '''

Schedule a 30 min Vistara Maintenenance window

  • vistara_maintenance: schedule_type=One_Time

'''


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-127217810.


Confidentiality And Disclaimer Notice

Please do not print this email unless it is absolutely necessary. The
information contained in this electronic message and any attachments to this
message are intended for the exclusive use of the addressee(s) and may contain
proprietary, confidential or privileged information. If you are not the intended
recipient, you should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately and destroy all copies of this message and any
attachments. WARNING: Computer viruses can be transmitted via email. The
recipient should check this email and any attachments for the presence of
viruses. The company accepts no liability for any damage caused by any virus
transmitted by this email. ……www.netenrich.com


from ansible-webdocs.

jedelman8 avatar jedelman8 commented on August 16, 2024

This is strange b/c it's always worked for me.

Can you try to upgrade Ansible? sudo pip install ansible --upgrade and empty example so example looks like this:

EXAMPLES = '''

'''

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

I had Ansible 1.8.4 and I upgraded to 1.9.2 and also emptied the EXAMPLES section. I am unable to run the playbook now

vagrant@vagrant-ubuntu-trusty-64:/ansible-webdocs$ ansible --version
ansible 1.9.2
configured module search path = /usr/share/ansible
vagrant@vagrant-ubuntu-trusty-64:
/ansible-webdocs$ ansible-playbook create-ansible-webdoc.yml -i /home/vagrant/playbooks/inventory -v
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 326, in
sys.exit(main(sys.argv[1:]))
File "/usr/bin/ansible-playbook", line 80, in main
help="set additional variables as key=value or YAML/JSON", default=[])
File "/usr/lib/python2.7/optparse.py", line 1021, in add_option
self._check_conflict(option)
File "/usr/lib/python2.7/optparse.py", line 996, in _check_conflict
option)
optparse.OptionConflictError: option -e/--extra-vars: conflicting option string(s): -e, --extra-vars
vagrant@vagrant-ubuntu-trusty-64:~/ansible-webdocs$

From: Jason Edelman [mailto:[email protected]]
Sent: Monday, August 03, 2015 6:15 PM
To: jedelman8/ansible-webdocs [email protected]
Cc: Dheeraj Panyam [email protected]
Subject: Re: [ansible-webdocs] Unable to generate documentation (#2)

This is strange b/c it's always worked for me.

Can you try to upgrade Ansible? sudo pip install ansible --upgrade and empty example so example looks like this:

EXAMPLES = '''

'''


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-127220096.


Confidentiality And Disclaimer Notice

Please do not print this email unless it is absolutely necessary. The
information contained in this electronic message and any attachments to this
message are intended for the exclusive use of the addressee(s) and may contain
proprietary, confidential or privileged information. If you are not the intended
recipient, you should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately and destroy all copies of this message and any
attachments. WARNING: Computer viruses can be transmitted via email. The
recipient should check this email and any attachments for the presence of
viruses. The company accepts no liability for any damage caused by any virus
transmitted by this email. ……www.netenrich.com


from ansible-webdocs.

jedelman8 avatar jedelman8 commented on August 16, 2024

Are there any errors? Please send me the -v output.

from ansible-webdocs.

dheerajpanyam avatar dheerajpanyam commented on August 16, 2024

Please find below the verbose output of the playbook run after upgrading Ansible to 1.9.2 and also emptying the EXAMPLES section.

Regards
Dheeraj

From: Dheeraj Panyam
Sent: Monday, August 03, 2015 6:26 PM
To: 'jedelman8/ansible-webdocs' [email protected]
Subject: RE: [ansible-webdocs] Unable to generate documentation (#2)

I had Ansible 1.8.4 and I upgraded to 1.9.2 and also emptied the EXAMPLES section. I am unable to run the playbook now

vagrant@vagrant-ubuntu-trusty-64:/ansible-webdocs$ ansible --version
ansible 1.9.2
configured module search path = /usr/share/ansible
vagrant@vagrant-ubuntu-trusty-64:
/ansible-webdocs$ ansible-playbook create-ansible-webdoc.yml -i /home/vagrant/playbooks/inventory -v
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 326, in
sys.exit(main(sys.argv[1:]))
File "/usr/bin/ansible-playbook", line 80, in main
help="set additional variables as key=value or YAML/JSON", default=[])
File "/usr/lib/python2.7/optparse.py", line 1021, in add_option
self._check_conflict(option)
File "/usr/lib/python2.7/optparse.py", line 996, in _check_conflict
option)
optparse.OptionConflictError: option -e/--extra-vars: conflicting option string(s): -e, --extra-vars
vagrant@vagrant-ubuntu-trusty-64:~/ansible-webdocs$

From: Jason Edelman [mailto:[email protected]]
Sent: Monday, August 03, 2015 6:15 PM
To: jedelman8/ansible-webdocs <[email protected]mailto:[email protected]>
Cc: Dheeraj Panyam <[email protected]mailto:[email protected]>
Subject: Re: [ansible-webdocs] Unable to generate documentation (#2)

This is strange b/c it's always worked for me.

Can you try to upgrade Ansible? sudo pip install ansible --upgrade and empty example so example looks like this:

EXAMPLES = '''

'''


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-127220096.


Confidentiality And Disclaimer Notice

Please do not print this email unless it is absolutely necessary. The
information contained in this electronic message and any attachments to this
message are intended for the exclusive use of the addressee(s) and may contain
proprietary, confidential or privileged information. If you are not the intended
recipient, you should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately and destroy all copies of this message and any
attachments. WARNING: Computer viruses can be transmitted via email. The
recipient should check this email and any attachments for the presence of
viruses. The company accepts no liability for any damage caused by any virus
transmitted by this email. ……www.netenrich.com


from ansible-webdocs.

cesar3030 avatar cesar3030 commented on August 16, 2024

I know this is an old issue but I had the same problem and it took me a couple hours to figure out why my doc was not being generated.

You need to be VERY VERY careful with your indentation. If you miss a white space or have an extra one, this will create a parse error (not thrown by Ansible or the module) and your doc won't be generated.

Here are the two mistakes I did:

  • Missing a white space in my indentation:
DOCUMENTATION = r'''
---
options:
  login_port:
    description:
      - Port of the MySQL server.
'''

each sub-level of options: has to be indented with exactly 2 white spaces.
For others attributes like description, author, requirements, etc you need 4 white spaces.

DOCUMENTATION = r'''
---
author:
    - Cesar Jeanroy
requirements:
    - Requires the python-mysqldb package on the remote host
notes:
    - Privileges can be specified using either upper or lower case.
    - When using the module with verbose flag (-vvv).....
'''
  • Don't use : in a sentence!
DOCUMENTATION = r'''
---
options:
  status:
    description:
      - If state: present then...  <- This will cause an error
      - If state=present then...  <- This won't cause an error
'''

That would be awesome if the module could tell where the parse failed.

Anyway, Thanks for that really cool module! 👍

from ansible-webdocs.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.