Skip to content

Commit

Permalink
bug: fix permissions on symlink (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
greenpau authored May 22, 2017
1 parent 7ae732e commit f7751a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
25 changes: 6 additions & 19 deletions ndmtk/plugins/action/files/cli/os/cisco_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
#

ndmtk:
- cli: show running-config
tags: configuration
paging: 'terminal length 0'
- cli: show version
tags: version
- description: 'BGP details'
- cli: 'show running-config'
tags: ['configuration']
paging: ['terminal length 0']
- cli: 'show version'
tags: ['version']
- description: 'Collect BGP routing table'
cli: 'show ip bgp'
conditions_match_any:
- '^router bgp'
Expand All @@ -37,9 +37,7 @@ ndmtk:
format: 'txt'
- cli: 'show ip arp'
- cli: 'show clock'

- cli: 'show ip route'

- cli: 'show ntp status'
conditions_match_any:
- '^ntp server'
Expand All @@ -60,7 +58,6 @@ ndmtk:
- cli: 'show ip igmp snooping groups detail'
conditions_match_any:
- 'ip igmp'

- cli: 'show ip pim rp'
conditions_match_any:
- 'ip pim'
Expand All @@ -70,7 +67,6 @@ ndmtk:
- cli: 'show ip pim interface'
conditions_match_any:
- 'ip igmp'

- cli: 'show startup-config'
- cli: 'show interface'
- cli: 'show vlan'
Expand Down Expand Up @@ -104,7 +100,6 @@ ndmtk:
- cli: 'show ip igmp interface'
conditions_match_any:
- 'ip igmp'

- description: 'Collect VRF status'
cli: show vrf all
conditions_match_any:
Expand All @@ -123,7 +118,6 @@ ndmtk:
- 'show vrf <VRF_NAME> detail'
required: ['VRF_NAME']
allow_empty_response: no

- description: 'Collects CDP neighbor detailed information'
cli: 'show cdp neighbors detail'
tags: 'cdp'
Expand All @@ -136,7 +130,6 @@ ndmtk:
- description: 'Collects CDP configuration on per interface basis'
cli: 'show cdp interface'
tags: 'cdp'

- description: 'Collect SNMP status'
cli: 'show snmp'
tags: ['management', 'snmp']
Expand Down Expand Up @@ -178,21 +171,17 @@ ndmtk:
tags: ['management', 'snmp']
conditions_match_any:
- '^snmp-server'

- description: 'Collect logging configuration'
cli: 'show logging'
tags: ['management', 'logging']

- description: 'Collect user privilege information'
cli: 'show privilege'
tags: ['aaa']

- description: 'Collect information TACACS+ servers'
cli: 'show tacacs'
tags: ['aaa']
conditions_match_any:
- '^tacacs-server host'

- description: 'Collect sFlow configuration'
cli: 'show sflow'
tags: ['sflow']
Expand All @@ -203,11 +192,9 @@ ndmtk:
tags: ['sflow']
conditions_match_any:
- '^sflow collector'

- description: 'Collect system processes'
cli: 'show process'
tags: ['process']

- cli: 'show ip ospf'
tags: ['routing', 'ospf']
conditions_match_any:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _post_build_toolkit(ansible_dirs, plugin_dir=None):
symlink_name = os.path.join(ansible_dir, 'plugins/' + i + '/ndmtk.py');
try:
os.symlink(symlink_target, symlink_name);
os.chmod(symlink_name, stat.S_IRUSR | stat.S_IWUSR);
os.chmod(symlink_name, stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH);
_egg_files.append(symlink_name);
_egg_files.append(symlink_name + 'c');
print("[INFO] created symlink '" + symlink_name + "' to plugin '" + symlink_target + "'");
Expand Down

0 comments on commit f7751a1

Please sign in to comment.