Created
September 12, 2017 16:36
-
-
Save anonymous/f689af35076ea39bd4023b78f90f2c2e to your computer and use it in GitHub Desktop.
Salt error when using sysrc.managed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The salt state | |
Set the default firewall rule to accept: | |
sysrc.managed: | |
- name: net.inet.ip.fw.default_to_accept | |
- file: /tmp/loader.conf | |
- value: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The error | |
ID: Set the default firewall rule to accept | |
Function: sysrc.managed | |
Name: net.inet.ip.fw.default_to_accept | |
Result: False | |
Comment: An exception occurred in this state: Traceback (most recent call last): | |
File "/usr/local/lib/python2.7/site-packages/salt/state.py", line 1750, in call | |
**cdata['kwargs']) | |
File "/usr/local/lib/python2.7/site-packages/salt/loader.py", line 1705, in wrapper | |
return f(*args, **kwargs) | |
File "/usr/local/lib/python2.7/site-packages/salt/states/sysrc.py", line 66, in managed | |
new_state = __salt__['sysrc.set'](name=name, value=value, **kwargs) | |
File "/usr/local/lib/python2.7/site-packages/salt/modules/sysrc.py", line 119, in set_ | |
newval = sysrc.split(': ')[2].split(" -> ")[1] | |
IndexError: list index out of range | |
Started: 16:34:14.035828 | |
Duration: 152.016 ms | |
Changes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat /tmp/loader.conf | |
net.inet.ip.fw.default_to_accept="1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment