Adam Tengler | b1ebaca | 2017-05-04 21:06:08 +0000 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | import salt.config |
| 3 | import salt.loader |
| 4 | |
| 5 | |
| 6 | def main(): |
| 7 | path = "/etc/keystone/policy.json" |
| 8 | __opts__ = salt.config.minion_config('/etc/salt/minion') |
| 9 | keystone_policy_mod = salt.loader.raw_mod(__opts__, 'keystone_policy', None) |
Adam Tengler | 6be5320 | 2017-05-15 14:15:44 +0200 | [diff] [blame] | 10 | if keystone_policy_mod: |
| 11 | result = keystone_policy_mod['keystone_policy.rule_list'](path) |
| 12 | if result and 'Error' not in result: |
| 13 | return {'keystone_policy': result} |
Adam Tengler | b1ebaca | 2017-05-04 21:06:08 +0000 | [diff] [blame] | 14 | return {} |
| 15 | |