Commit Graph

93185 Commits

Author SHA1 Message Date
Beorn Facchini
3934336b3b
Add wrapped token auth method for vault module 2018-04-14 15:56:30 +10:00
Beorn Facchini
da61617dbc
Support return value when setting vault secret 2018-04-14 13:00:18 +10:00
rallytime
59f5880e72
lint fix 2018-04-13 15:53:34 -04:00
Nicole Thomas
8761b81a69
Merge pull request #47051 from rallytime/fix-lint
Simplify LooseVersion check in `__virtual__` check in mac_assistive module
2018-04-13 15:43:32 -04:00
Nicole Thomas
bbb8018b55
Merge pull request #47057 from corywright/fix-minionfs-whitelist-docs
Fix copy/paste typo in minionfs tutorial
2018-04-13 15:43:00 -04:00
Erik Johnson
5c4c0468ad
Fix regression in handling of environment/saltenv
This was broken sometime between when the change was made and 2018.3.0
was released. This fixes the issue and adds a regression test.
2018-04-13 13:44:55 -05:00
Erik Johnson
335ad8d376
Parse all options before exiting
This allows for the state to report on multiple blacklisted opts
2018-04-13 12:40:11 -05:00
Erik Johnson
af43b7b090
Add file.patch rewrite info to Fluorine release notes 2018-04-13 12:40:11 -05:00
Erik Johnson
8ea4dfcf2c
Rewrite file.patch state integration tests
This scraps the old tests and writes an entirely new test class with
over a dozen new tests, covering all the new functionality added in the
file.patch state rewrite.
2018-04-13 12:40:11 -05:00
Erik Johnson
88cedf33e9
Rewrite file.patch state
This is a full rewrite. Previously, this state required the user to
provide the hash of the patched file, but this is no longer necessary as
the state is now able to check whether or not the patch will apply
cleanly without actually making any changes. The following is a summary
of the changes made in this rewrite:

- The `hash` and `dry_run_first` arguments are now ignored and generate
  a warning in the state return if used.
- The path being patched can now be a directory or a file, instead of
  just a file.
- The patch file is now downloaded by calling `file.managed`. This
  expands the potential file sources to include remote files (with all
  the hash verification features provided by `file.managed`), and also
  adds templating support.
- Instead of blindly running the `file.patch` remote-execution function
  and then checking that the patched result matches a pre-provided
  result, the state will run a non-dry-run `file.patch` with all patch
  output redirected to a temp file. This does 2 things: 1) It keeps any
  changes from being made, and 2) creates a reject file (which is not
  done when `--dry-run` is used with `patch`). This initial `file.patch`
  will tell us whether or not the patch would apply cleanly. If it does
  not, then we attempt to reverse-apply the rejected hunks using
  `--dry-run`, and if they apply cleanly then we know that the patch has
  already been applied and can exit with a `True` result. This means
  that we only actually attempt to apply the patch if we know if will
  apply cleanly, and prevents us from leaving the file(s) being patched
  in a partially-patched state, improving greatly the idempotence of the
  state.
2018-04-13 12:40:11 -05:00
Erik Johnson
9ee9b3fab9
Add saltenv to error message 2018-04-13 12:39:35 -05:00
rallytime
1ddf8c584b
Update old utils files to new new utils files path 2018-04-13 12:32:05 -04:00
rallytime
28a79ebba4
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/modules/win_lgpo.py
  - salt/netapi/rest_tornado/saltnado.py
2018-04-13 12:30:51 -04:00
Ahmed AbouZaid
9cde4545ad use log.error in case database is not defined 2018-04-13 17:53:34 +02:00
Cory Wright
9b7ee97d12
Fix copy/paste typo in minionfs tutorial 2018-04-13 11:52:41 -04:00
rallytime
07bca96afc
Reduce the number of days an issue is stale by 10 2018-04-13 10:48:51 -04:00
Z. Liu
a847466946 handle jinja error in <module> level
prepare test case:
 # echo '{% import_yaml "a.yaml" as a with context %}' > a.sls
 # echo 'a: {{ "now"|strftime }}' > a.yaml

remove 'import salt.utils.daeutils' from salt/utils/templates.py, then run

 # salt-call state.sls a
[CRITICAL] Rendering SLS 'base:a' failed: Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/salt/utils/templates.py", line 169, in render_tmpl
    output = render_str(tmplstr, context, tmplpath)
  File "/usr/lib64/python2.7/site-packages/salt/utils/templates.py", line 395, in render_jinja_tmpl
    line, out = _get_jinja_error(trace, context=decoded_context)
  File "/usr/lib64/python2.7/site-packages/salt/utils/templates.py", line 248, in _get_jinja_error
    line = _get_jinja_error_line(trace)
  File "/usr/lib64/python2.7/site-packages/salt/utils/templates.py", line 231, in _get_jinja_error_line
    return _get_jinja_error_slug(tb_data)[1]
TypeError: 'NoneType' object has no attribute '__getitem__'

after apply the patch:

 # salt-call state.sls a
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/salt/utils/templates.py", line 169, in render_tmpl
    output = render_str(tmplstr, context, tmplpath)
  File "/usr/lib64/python2.7/site-packages/salt/utils/templates.py", line 402, in render_jinja_tmpl
    tmplstr)
SaltRenderError: Jinja syntax error: no filter named 'strftime'
/var/cache/salt/minion/files/base/a.yaml(1):
---
a: {{ "now"|strftime }}    <======================
---
[CRITICAL] Rendering SLS 'base:a' failed: Jinja syntax error: no filter named 'strftime'
/var/cache/salt/minion/files/base/a.yaml(1):
---
a: {{ "now"|strftime }}    <======================
---

which shows accurate information for debug.
2018-04-13 14:39:33 +00:00
Nicole Thomas
1700a10ebe
Merge pull request #46326 from kstreee/fix-client-local
Fixes a timing bug of saltnado's client local.
2018-04-13 09:59:27 -04:00
Nicole Thomas
d5afa4a2c5
Merge pull request #47046 from clan/file_diff
switch order of file to be diffed
2018-04-13 09:40:12 -04:00
Nicole Thomas
ec9251ecd3
Merge pull request #47048 from OrlandoArcapix/Issue46985-fix-grafana4-state
Issue46985 fix grafana4 state
2018-04-13 09:34:28 -04:00
Nicole Thomas
d8c4c221cf
Merge pull request #47017 from Unity-Technologies/hotfix/pip_windows
Don’t encode a unicode string
2018-04-13 09:31:32 -04:00
Nicole Thomas
68546d27ea
Merge pull request #46890 from MaximilianMeister/pymysql-returner
fall back to PyMySQL
2018-04-13 09:26:56 -04:00
rallytime
d52b3689d9
Simplify LooseVersion check in __virtual__ check in mac_assistive module 2018-04-13 09:17:43 -04:00
Orlando Richards
259d747414 Remove accidentally added copy of a file 2018-04-13 11:29:35 +01:00
Orlando Richards
6c8c3da74d Return an empty dict instead of 'None' from grafana4 states
Fixes #46985
2018-04-13 09:55:54 +01:00
Maximilian Meister
e83e98d968
fall back to PyMySQL
same is already done in modules (see #26803)

Signed-off-by: Maximilian Meister <mmeister@suse.de>
2018-04-13 09:08:57 +02:00
Z. Liu
bb58605c54 switch order of file to be diffed 2018-04-13 07:00:24 +00:00
Tanky Woo
551f4e10cf Fix ba7d00f5 for gentoo pkg.installed
The commit ba7d00f5 change _cpv_to_cp inner implementation, but the
original parameter cpv is not changed, its format is `<p>-<v>`, and
`dep_getkey` need format for `=<p>-<v>` if `cpv` with version, so it cause
`InvalidAtom` exception and actually return cpv itself. So I add the
original implementation back to fix this problem and still keep
`dep_getkey` if the cpv format will be fixed in the future
2018-04-13 14:53:09 +08:00
Mike Place
9e13b5fd81
Merge pull request #46892 from samilaine/update-doc-topics-event-events
Working Python examples for the event documentation.
2018-04-12 13:59:56 -06:00
Mike Place
81359e3124
Merge pull request #46996 from gtmanfred/vault
add unseal for vault runner
2018-04-12 13:53:17 -06:00
Mike Place
800a91bf45
Merge pull request #47005 from ari/patch-3
Remove salt FreeBSD repo which is now 2 years out of date
2018-04-12 13:52:03 -06:00
Mike Place
5b7544eaa0
Merge pull request #47019 from rallytime/bp-46919
Back-port #46919 to 2018.3
2018-04-12 13:43:00 -06:00
Mike Place
ac2d54d78a
Merge pull request #47029 from terminalmage/issue46859
ldapmod.py/ldap3.py: Force modlist for search/modify/etc. to be str types
2018-04-12 13:41:28 -06:00
Nicole Thomas
24d275154a
Merge pull request #47035 from terminalmage/fix-decorator-path
Fix incorrect decorator path in salt/modules/lxd.py
2018-04-12 15:23:28 -04:00
Nicole Thomas
e1e2bd3d4a
Merge pull request #47034 from rallytime/merge-develop
[develop] Merge forward from 2018.3 to develop
2018-04-12 14:59:00 -04:00
Nicole Thomas
e6e07720fa
Merge pull request #46930 from dwoz/crptodomekeyfix
Clean up bad public key headers
2018-04-12 14:57:36 -04:00
Erik Johnson
193a896fd5
Fix incorrect decorator path in salt/modules/lxd.py
NOTE: This bug only exists in develop
2018-04-12 11:41:36 -05:00
Nicole Thomas
0e43becc12
Merge pull request #47008 from garethgreenaway/46951_fixing_slack_engine_aliases
[2018.3] Fixing aliases in slack engine
2018-04-12 11:24:39 -04:00
Nicole Thomas
c33de7c82d
Merge pull request #47009 from garethgreenaway/46947_slack_documentation_update_catch_non_dicts
[2018.3] fixes to slack engine documentation
2018-04-12 11:20:53 -04:00
Gareth J. Greenaway
f2e484ed54
Merge branch '2018.3' into crptodomekeyfix 2018-04-12 08:12:00 -07:00
Nicole Thomas
c3c00316c5
Merge pull request #46913 from lomeroe/2017_7-fix46877
2017.7 Fix #46877 -- win_lgpo start/shutdown script reading
2018-04-12 11:10:49 -04:00
Nicole Thomas
9e37cfc9d6
Merge pull request #47025 from terminalmage/fix-server_id-windows
Fix server_id grain in PY3 on Windows
2018-04-12 11:07:59 -04:00
Nicole Thomas
2e193cfb45
Merge pull request #47027 from rallytime/bp-44508
Back-port #44508 to 2017.7
2018-04-12 11:05:50 -04:00
Nicole Thomas
68d17c71f1
Merge pull request #47023 from rallytime/bp-46997
Back-port #46997 to 2018.3
2018-04-12 11:05:23 -04:00
rallytime
fe10957ce0
Merge branch '2018.3' into 'develop'
Conflicts:
  - salt/cloud/clouds/azurearm.py
2018-04-12 11:00:14 -04:00
Nicole Thomas
9cf3c6406a
Merge pull request #47026 from rallytime/merge-2018.3
[2018.3] Merge forward from 2017.7 to 2018.3
2018-04-12 10:39:40 -04:00
Daniel Wallace
d3be828696
Merge pull request #47021 from garethgreenaway/920_state_module_jinja_filters_test_test_path_which
[2018.3] Fixing integration.modules.test_state_jinja_filters.StateModuleJinjaFiltersTest.test_path_which
2018-04-12 08:12:38 -05:00
Daniel Wallace
385fe2bc1e
Merge pull request #47020 from rallytime/bp-46970
Back-port #46970 to 2017.7
2018-04-11 16:48:24 -05:00
Nicole Thomas
66e8445b82
Merge pull request #47022 from corywright/add-auth-file-module-to-docs
Add auth.file module to auth documentation page
2018-04-11 17:11:09 -04:00
Erik Johnson
ab6314247b
ldapmod.py/ldap3.py: Force modlist for search/modify/etc. to be str types 2018-04-11 14:55:48 -05:00