generate a summary of servers the software installed on them

23 views
Skip to first unread message

Ralph van Etten

unread,
Jun 29, 2016, 6:23:04 AM6/29/16
to Salt-users
Hi,

I would like to have salt to automatically generate a wiki page (basically just a markdown text file) which lists all servers and the software installed on it to create an overview page of all servers, its role and the (main) software installed on it.
Something like:

* server 1 (web server)
  * apache
    * site: www.example.com
    * site: www.something.com
* server 2 (management server)
  * salt-master
* server 3 (database server)
  * postgresql

I thought of adding a description and other information to every sls file and then when salt runs, this information is stored in a file and collected somehow.
Or perhaps create a tool which reads the sls files directly and converts it into a markdown document.

Does something like this already exists? I tried googling for it but I've found nothing.
If there is no such tool, what is the best way to do this?


Thanks,

Ralph.

David Boucha

unread,
Jun 29, 2016, 2:17:15 PM6/29/16
to salt users list
Salt doesn't have anything that does this specifically out of the box. However it should be pretty straightforward to either write your own python module or possibly a salt runner that would query that information from your minions and use that information to build the wiki page you're looking for.

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dmitry Golubenko

unread,
Jun 30, 2016, 5:05:47 AM6/30/16
to salt-...@googlegroups.com
В Срд, 29/06/2016 в 12:17 -0600, David Boucha пишет:
> Salt doesn't have anything that does this specifically out of the box.
> However it should be pretty straightforward to either write your own
> python module or possibly a salt runner that would query that
> information from your minions and use that information to build the
> wiki page you're looking for.
but similiar thing can be easily done by reversing task: not detect what
is inside system, but state how we configure system:

create some grains/pillars that describe your configuration:
roles:
- apache
- salt-master
....
apache:
site:
- www.example.com
- www.something.com
...

then apply reqiured states depending on that grains/pillars set for
specific minion via top-file targeting specific states for specific
minion

then generate your markdown text file using that grains/pillars using
jinja

HTH

Ralph van Etten

unread,
Jul 4, 2016, 4:32:45 AM7/4/16
to Salt-users


On Wednesday, June 29, 2016 at 8:17:15 PM UTC+2, David Boucha wrote:
Salt doesn't have anything that does this specifically out of the box. However it should be pretty straightforward to either write your own python module or possibly a salt runner that would query that information from your minions and use that information to build the wiki page you're looking for.

That is an interesting idea but it sounds like a lot of work. I'll look into building a module or runner.

Thanks.

Ralph.

Ralph van Etten

unread,
Jul 4, 2016, 4:36:27 AM7/4/16
to Salt-users, dmitry.g...@xiag.ch


On Thursday, June 30, 2016 at 11:05:47 AM UTC+2, Dmitry Golubenko wrote:
В Срд, 29/06/2016 в 12:17 -0600, David Boucha пишет:
> Salt doesn't have anything that does this specifically out of the box.
> However it should be pretty straightforward to either write your own
> python module or possibly a salt runner that would query that
> information from your minions and use that information to build the
> wiki page you're looking for.
but similiar thing can be easily done by reversing task: not detect what
is inside system, but state how we configure system:

create some grains/pillars that describe your configuration:
roles:
  - apache
  - salt-master
  ....
apache:
  site:
    - www.example.com
    - www.something.com
  ...

then apply reqiured states depending on that grains/pillars set for
specific minion via top-file targeting specific states for specific
minion

then generate your markdown text file using that grains/pillars using
jinja


Thanks.
That would work also. Although it would require some changes to the current structure but it might be easier to implement.

Ralph.

Reply all
Reply to author
Forward
0 new messages