Ales Komarek | ef0eea3 | 2018-02-14 15:47:13 +0100 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | ''' |
| 3 | Salt modules to work with the Architect service. |
| 4 | ''' |
| 5 | |
| 6 | # Import python libs |
| 7 | from __future__ import absolute_import |
Ales Komarek | ef0eea3 | 2018-02-14 15:47:13 +0100 | [diff] [blame] | 8 | import logging |
| 9 | |
| 10 | __virtualname__ = 'architect' |
| 11 | |
| 12 | logger = logging.getLogger(__name__) |
| 13 | |
| 14 | |
| 15 | def __virtual__(): |
| 16 | return __virtualname__ |
| 17 | |
| 18 | |
Ales Komarek | c312a29 | 2018-02-15 11:01:04 +0100 | [diff] [blame] | 19 | def node_info(): |
Ales Komarek | ef0eea3 | 2018-02-14 15:47:13 +0100 | [diff] [blame] | 20 | ''' |
| 21 | Get Salt minion metadata and forward it to the Architect master. |
| 22 | |
| 23 | CLI Examples: |
| 24 | |
| 25 | .. code-block:: bash |
| 26 | |
Ales Komarek | c312a29 | 2018-02-15 11:01:04 +0100 | [diff] [blame] | 27 | salt-call architect.minion_info |
Ales Komarek | ef0eea3 | 2018-02-14 15:47:13 +0100 | [diff] [blame] | 28 | ''' |
Ales Komarek | ef0eea3 | 2018-02-14 15:47:13 +0100 | [diff] [blame] | 29 | data = { |
| 30 | 'pillar': __salt__['pillar.data'](), |
| 31 | 'grain': __salt__['grains.items'](), |
Ales Komarek | 0cbc679 | 2018-02-14 17:12:37 +0100 | [diff] [blame] | 32 | 'lowstate': __salt__['state.show_lowstate'](), |
Ales Komarek | ef0eea3 | 2018-02-14 15:47:13 +0100 | [diff] [blame] | 33 | } |
Ales Komarek | c312a29 | 2018-02-15 11:01:04 +0100 | [diff] [blame] | 34 | return data |