Commit graph

206 commits

Author SHA1 Message Date
Brian Coca
944161c9ea Fix fact cleaning (#42595)
* fix fact cleanup

fixes #41684

(cherry picked from commit 006f08da99)
2018-07-16 17:23:26 -07:00
Brian Coca
e8ff717ba8 preserve delegation info on no_log (#42577)
* preserve delegation info on no_log

fixes #42344


(cherry picked from commit e115e6496f)
2018-07-16 17:21:49 -07:00
dgeo
64737fea2d fix a (forgotten?) change in moving createhome -> create_home (#42711)
* fix a (forgotten?) change in moving createhome -> create_home

Fix for following bug on FreeBSD host whith user module:
```
fatal: [webssp]: FAILED! => {"changed": false, "module_stderr": "X11 forwarding request failed
Traceback (most recent call last):
  File \"/tmp/ansible_2rmlBl/ansible_module_user.py\", line 2487, in <module>
    main()\n  File \"/tmp/ansible_2rmlBl/ansible_module_user.py\", line 2426, in main
    (rc, out, err) = user.modify_user()
  File \"/tmp/ansible_2rmlBl/ansible_module_user.py\", line 1011, in modify_user
    if (info[5] != self.home and self.move_home) or (not os.path.exists(self.home) and self.createhome):
AttributeError: 'FreeBsdUser' object has no attribute 'createhome'
", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
```
It happenned with 'createhome' AND with 'create_home' form, with python 2.7 AND python 3.6

* Add changelog


Co-authored-by: dgeo <dgeo@users.noreply.github.com>
(cherry picked from commit ae96ba0d4f)
2018-07-16 17:21:04 -07:00
Nilashish Chakraborty
8b26e3899f Fix ios_vlan issue CP into 2.6 (#42665)
* Make ios_vlan identify vlans starting with 9 (#42247)

* Make ios_vlan identify vlans starting with 9

* Add unit test for vlan id start with 9

(cherry picked from commit 70e33ef92c)

* Added changelog for ios_vlan fix

* Fixed changelog Shippable errors

* Fix 2 for Shippable changelog errors
2018-07-16 17:13:14 -07:00
Jerry Chong
8274fd00fc Fix NameError in pause module (#42038)
* Fix NameError in pause module

* Add comment and changelog

Co-authored-by: Jerry Chong <jchong@netbase.com>
(cherry picked from commit 42f44b24c6)
2018-07-16 17:10:48 -07:00
Trishna Guha
edf933918d nxos and eos bugfix pick2.6 (#42291)
* fix nxos_vxlan_vtep_vni issue (#42183)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 981c9f6a79)

* nxos CI failures bugfix (#42240)

* fix nxos_portchannel and remove deprecated param in test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix _nxos_switchport CI failures

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix nxapi nxos_command test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* remove unsupported param nxos_smoke test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix nxos_vxlan_vtep_vni

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* syntax error

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 805d13f287)

* Update eos_l2_interface.py (#42270)

(cherry picked from commit 51092c6ea5)

* add changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Enforcing NXAPI default HTTP behavior (#41817)

* nxos_nxapi http default behavior

* Use nxos_nxapi module in prepare_nxos_tests

* Refactor nxos_nxapi configure test to use yaml block

* Extend nxos_nxapi https & http test cases

* Removed NXOS internal release naming

* Resolved ansibot sanity errors

* Fix typo in prepare_nxos_tests

* Address PR comments

* Shippable indicates this is no longer needed

* Add port change logic and testing

(cherry picked from commit db7300904d)

* update changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-09 11:31:57 -07:00
Ganesh Nalawade
9ed5e706be Fix fetching old style facts in junos_facts module (#42336) (#42351)
* Fix fetching old style facts in junos_facts module (#42336)

* Fix fetching old style facts in junos_facts module

Fixes #42298
* To fetch old style facts from junos device it requires
  login credentials in provider, hence while using
  connection=nectonf do not delete provider values
  as it might not be ignored

* Add `ofacts` as one of the options in `gather_subset`

* Minor update in documentation

* Fix CI failure

(cherry picked from commit 31dd41e4c5)

* Update changelog
2018-07-09 11:27:10 -07:00
Sam Doran
3bec68a3b3 Backport #42013 for 2.6 - linenfile empty regexp warning (#42204)
* Add warning when using an empty regexp in lineinfile (#42013)

* Revert "Account for empty string regexp in lineinfile (#41451)"

This reverts commit 4b5b4a760c.

* Use context managers for interacting with files

* Store line and regexp parameters in a variable

* Add warning when regexp is an empty string

* Remove '=' from error messages

* Update warning message and add changelog

* Add tests

* Improve warning message

Offer an equivalent regexp that won't trigger the warning.
Update tests to match new warning.

* Add porting guide entry for lineinfile change

# Conflicts:
#	docs/docsite/rst/porting_guides/porting_guide_2.7.rst
#	lib/ansible/modules/files/lineinfile.py
#	test/integration/targets/lineinfile/tasks/main.yml

* Add porting guide info
2018-07-09 11:26:45 -07:00
Sumit Jaiswal
6e479d5989 To fix the NoneType error raised in ios_l2_interface when Access Mode VLAN is unassigned (#42343)
* To fix the NoneType error raised in ios_l2_interface when Access Mode VLAN is unassigned (#42312)

* to fix the bug41657

* to fix review comment

(cherry picked from commit 828dd1a663)

* adding changelog

* renaming the changelog file name

* deleting the wrong changelog file name
2018-07-09 11:25:37 -07:00
Matt Clay
1a6fe6cc05 New release v2.6.1 2018-07-05 11:48:35 -07:00
Jordan Borean
e65f7d218d win_domain: fix typo in cmdlet call (#41993)
(cherry picked from commit 77526a5036)
2018-07-03 15:22:08 -07:00
Jordan Borean
1024f53ffd Win group membership sid refactor 2.6 (#41990)
* Refactor/fix win_group_membership to use SIDs for internal comparisons (#40725)

* refactor win_group_membership to use SIDs for comparisons instead of name parsing

* carry over previous doc cleanup changes

* remove trailing whitespace from docs

(cherry picked from commit bcb49f2575)

* Added changelog fragment
2018-07-03 15:21:21 -07:00
Brian Coca
4cecbe81ad [stable-2.6] ignore ansible.cfg in world writable cwd (#42070)
* ignore ansible.cfg in world writable cwd
 * also added 'warnings' to config
 * updated man page template
(cherry picked from commit b6f2aad)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2018-07-03 15:19:59 -07:00
Sloane Hertel
25ee10cd9a [stable-2.6] Fix file module with check_mode - Fixes #42111 (#42115)
* Fix file module check_mode
(cherry picked from commit 22a6927)

Co-authored-by: Sloane Hertel <shertel@redhat.com>
2018-07-03 15:18:46 -07:00
Ganesh B. Nalawade
d1a92f85d2 Update changelog 2018-07-03 15:09:16 -07:00
Sloane Hertel
851725d72a Fix setting required options for inventory plugins - backport/2.6/42049 (#42120)
* Fix setting required options for inventory plugins (#42049)

* Fix setting required options for inventory plugins

* call set_options for yaml and script plugin

(cherry picked from commit 44e5886385)

* changelog
2018-07-03 15:07:35 -07:00
Brian Coca
1f80949f96 [stable-2.6] avoid loading vars on unspecified basedir (cwd) (#42067)
* avoid loading vars on unspecified basedir (cwd)
(cherry picked from commit de0e11c)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2018-07-03 15:03:52 -07:00
Abhijeet Kasurde
ed26ee73ff Restore BOOLEANS import in basic.py (#42008)
This import was removed by mistake. This is required for backward
compatibility.

Fixes: #41988

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-03 14:58:03 -07:00
John Barker
4226fb6e1a nsupdate_fix_hmac-sha384 2018-07-03 10:19:34 -07:00
Matt Clay
8ce3bd6dea New release v2.6.0 2018-06-28 14:38:38 -07:00
Matt Clay
478ab3f8b1 New release v2.6.0rc5 2018-06-26 18:33:36 -07:00
Sam Doran
bd1ecd016b Backport #41767 for 2.6 - Skip if insertbefore is using BOF until later in the module (#41929)
* Skip if insertbefore BOF until later (#41767)

If a line match is found in the file and no regexp is specified, insertbefore would improperly try to add a line if set to BOF.

Add tests for this scenario.

(cherry picked from commit eaae1318f8)

* Add changelog fragment
2018-06-26 14:02:38 -07:00
Matt Martz
08e016780b Backport #41860 for 2.6 - support group_by with implicit localhost (#41927)
* Use inventory.get_host instead of direct access to inventory.hosts (#41860)

* Use inventory.get_host instead of direct access to inventory.hosts. Fixes #32152

* Prevent potential side effect, by using self._inventory.localhost directly instead of get_host

(cherry picked from commit 1a2ef0922f)

* Add changelog for #41860
2018-06-26 13:49:26 -07:00
Matt Martz
c15f99f95a Backport #41907 for 2.6 - fix password lookup loading (#41928)
* Don't import password lookup from network filters. Fixes #41874 (#41907)

(cherry picked from commit 93537425a0)

* Add changelog for #41907
2018-06-26 13:48:09 -07:00
Jordan Borean
cfb4a8236f win_iis_webapppool: do not output some cmdlet outputs (#41884)
(cherry picked from commit abfcc35e6f)
2018-06-26 13:44:38 -07:00
Brian Coca
0f477d1318 options should be settable multiple times
(cherry picked from commit 27e3cd6e05)
2018-06-26 13:33:36 -07:00
Matt Clay
9917d648e5 New release v2.6.0rc4 2018-06-25 16:22:04 -07:00
Jordan Borean
25ad5fa225 Stop displaying kinit pass input on a failure (#41882)
* Stop displaying kinit pass input on a failure

* Fixed up minor logic info and added tests

(cherry picked from commit 9b7b564d75)
2018-06-25 13:51:09 -07:00
Brian Coca
8fafecc979 fix vars hostname fallback
also made it optimistic, rely on exceptions instead of copmlex if chains

(cherry picked from commit 11dbed1350)
2018-06-25 11:23:52 -07:00
Brian Coca
82b0ee21f7 exclude lookup_terms from config errors (#41740)
* exclude lookup_terms from config errors
* moved direct

(cherry picked from commit 0102e42272)
2018-06-21 18:26:39 -07:00
Brian Coca
88d0e2a04a fix minor issues with debug and item labels (#41331)
* fix minor issues with debug and item labels

 - no more `item=None`, we always have a label now
 - debug should only show expected information, either msg= or the var in var=
 - also fixed method name, deprecated misleading _get_item

(cherry picked from commit 27c43daab8)
2018-06-21 16:58:57 -07:00
Sumit Jaiswal
273fb57ea8 To fix eos_vrf failure when transport method is eapi (#41470) (#41771)
* To fix eos_vrf failure when transport method is eapi (#41470)

* resolve bug 40930

* resolve bug 40930

* to fix review comments

* to fix review comments

* reverting the changes based on review

(cherry picked from commit c989b62eef)

* adding changelog for backport
2018-06-21 16:20:46 -07:00
Abhijeet Kasurde
5e10424f31 Raise Exception in virtualbox inventory plugin
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 37293dec3d)
2018-06-21 16:16:54 -07:00
Brian Coca
96896654bd added missing raise
(cherry picked from commit 89f169127b)
2018-06-21 16:16:01 -07:00
Martin Krizek
8ddb4c3b0d Backport 2.6: apt: fix apt-mark on debian6 (#41725)
* apt: fix apt-mark on debian6 (#41530)

(cherry picked from commit 2e68811c34)

* Add changelog/fragment
2018-06-21 16:15:10 -07:00
Jordan Borean
9ce55f7e94 win_updates fix when win_updates is run with async (#41756)
(cherry picked from commit 11bd3fd318)
2018-06-21 16:13:47 -07:00
Brian Coca
4930710af2 handle groups correctly when they are 'null' (#41698)
* handle groups correctly when they are 'null'

 - even if defined as mapping but having no keys, objects shoudl still be processed correctly
 - also add ansilbe_verbosity to vars not to display in ansible-inventory

fixes #41692

(cherry picked from commit 05a49d6eb6)
2018-06-21 15:24:53 -07:00
Toshio Kuratomi
d11a190349 [stable-2.6] Fix file state=touch not returning diff information
Fixes #41755
(cherry picked from commit 8bd245a)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-06-21 14:36:33 -07:00
Matt Clay
f5a9e007ce New release v2.6.0rc3 2018-06-18 22:43:49 -07:00
Toshio Kuratomi
d66dc0dcf3 [stable-2.6] Add changelog for gce_net sort fix
https://github.com/ansible/ansible/pull/41567
(cherry picked from commit ad8142fc6d)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-06-18 15:02:10 -07:00
James Cassell
5dd90fb752 update play_context for reset_connection (#40866)
steps taken from lib/ansible/executor/task_executor.py

fixes: https://github.com/ansible/ansible/issues/27520
(cherry picked from commit 23fbe0ce8e)
2018-06-18 15:00:51 -07:00
Toshio Kuratomi
70f4f89178 Bkprt no log fix (#41452)
* no_log even when task_result doesn't provide key

 - now also checks task property
 - added reproducer to tests for unreachable status on item loop

(cherry picked from commit 336b3762b2)

* Add changelog entry for the no_log fix

(cherry picked from commit 5fdd101a3e)

* Tasks that are expected to fail need to begin with a special string

(cherry picked from commit a5fd86cf6d)
2018-06-13 14:45:06 -07:00
Deepak Agrawal
6cdc3ac057 iosxr_config crash if config has route-policy with multiple levels of… (#41490)
* iosxr_config crash if config has route-policy with multiple levels of 'ifelseif' and other caveats (#41091)

* diff in as-path-set or prefix-set

* fix caveat diff can not have last line with comma in prefix-set/as-path/community-set

* Simplify fix to include indentation before parse

* remove debugger

* route-policy diffs

* fix iosxr_config crash issue

* new changes in iosxr_config after git add

* end-policy-map and end-class-map are properly indented so match misplaced children only when end-* is at the beigining also fix pep8

* Remaining config blocks of route-policy which needs exclusion from diff. added new tests

* pylint/pep8 warnings

* Review comments , sanity test fix

* shbang warning

* remove unused import

(cherry picked from commit 2db6a8c26a)

* changelog entry

* sanity fix
2018-06-13 14:43:18 -07:00
ABond
cda4b6dad1 Digital Ocean Block Storage Bug (#41431)
Fix added for Digital Ocean Volumes API change causing Ansible to recieve an unexpected value in the response.

Signed-off-by: ABond <ajbond2005@gmail.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 4efe53edd5)
2018-06-12 08:27:44 -07:00
Michael Doyle
36c626977c Update CHANGELOG-v2.6.rst 2018-06-12 08:26:03 -07:00
whatupmiked
f70978c0b9 2.6 backport #41284 to fix json spelling for vyos command 2018-06-12 08:26:03 -07:00
Matt Clay
e458807129 New release v2.6.0rc2 2018-06-08 22:03:08 -07:00
Toshio Kuratomi
4c6642debd Make admin_users only contain root and toor because admin is used for non-privileged accounts
This fixes one specific instance of failure to chown from a privileged
account:
https://github.com/ansible/ansible/issues/16052#issuecomment-384976615

Fixes #41160

(cherry picked from commit 461a2733e6)
2018-06-08 21:18:50 -07:00
s-hertel
aad1940e61 changelog 2018-06-08 09:50:17 -07:00
Sloane Hertel
97c6805d47 aws_s3: don't decrypt file before uploading - fixes #39287 (#39634)
* aws_s3: do not decrypt file before uploading to bucket

* changelog

(cherry picked from commit 387c37e255)
2018-06-07 16:16:30 -07:00
Christian Groschupp
34f08b4eb5 cherry-pick e59742eccd and resolve conflicts
[aws] Remove walrus conditional in aws_s3 module when using custom s3_url

fix aws_s3 module to use custum s3_url
2018-06-07 15:55:02 -07:00
Sloane Hertel
c168cd482c cherry-picked from 89cea78e30 and fixed merge conflicts from restructuring the integration tests in devel
Fix async for aws_s3

Add a test that async is able to be used on aws_s3 tasks
2018-06-07 15:54:18 -07:00
Matt Martz
f74312e2bd Remove changelog entry for reverted #39365 2018-06-07 15:53:25 -07:00
Matt Davis
c5484e845a fix ansible-doc regression from missing plugins (#41167)
(cherry picked from commit 087efe4232)
2018-06-07 15:33:38 -07:00
Will Thames
5503285c20 Fix ec2_ami block_device_mapping volume_size to be int in 2.6 (#40938) (#41216)
* Fix ec2_ami block_device_mapping volume_size to be int in 2.5 (#40938)

* fix ec2_ami block_device_mapping size to be int

* fixed cr issues

renamed `type` to `attribute_type`
reused `new_item` instead of creating new variable `value`

(cherry picked from commit ab96a84154)

* changelog
2018-06-07 15:27:18 -07:00
Matt Clay
0a6c643e8e New release v2.6.0rc1 2018-06-05 19:55:46 -07:00
Matt Clay
ddb60ce345 Implement new changelog generator.
(cherry picked from commit 70c475da6c)
2018-06-05 19:38:32 -07:00
Matt Clay
121139b755 Changelog fragment cleanup. 2018-06-04 17:10:44 -07:00
Matt Clay
8f2c34fc69 Add changelog entries from deleted CHANGELOG.md. 2018-05-31 16:06:49 -07:00
Matt Clay
707f069fe8 New release v2.6.0a2 2018-05-30 17:47:09 -07:00
Matt Martz
87a163064f
Backport #40833 for 2.6 - synchronize _remote_is_local (#40918)
* Use _remote_is_local=True for local connection in synchronize (#40833)

* All instances of local connection should use _remote_is_local=True. Fixes #40551

* Switch to instance attribute for synchronize

* Add test that shows that synchronize _remote_is_local addresses tmpdir building

(cherry picked from commit ad7ba91f75)

* Add changelog entry for #40833
2018-05-30 16:53:50 -05:00
Ed Costello
c4536bc827 Support check mode in aws_ses_identity module (#38422)
* Port aws_ses_identity module to use AnsibleAWSModule

* Support Check Mode in aws_ses_identity

* Add tests for check mode

* Move feedback forwarding parameter check to before any changes are made.
2018-05-25 18:46:25 -04:00
Strahinja Kustudic
0781a7f68c Fixed check_mode status to be the same as normal execution (#40721)
* Fixed check_mode status to be the same as normal execution

* Now when setting the status to `disabled` in check_mode it correctly
returns the state changed and prints a warning like it does in normal
model. Before it always returned changed even if everything was set
correctly and a reboot was required.

* Add changelog entry


Co-authored by: Strahinja Kustudic <kustodian@gmail.com>
2018-05-25 17:06:11 -04:00
Jordan Borean
5e28e282a5 winrm: add better exception handling for krb5 auth with pexpect (#39930)
* winrm: add better exception handling for krb5 auth with pexpect

* Added changelog fragment

* Added exception handler in case kinit path isn't valid, added test cases

* fixed for Python 2 compatibility
2018-05-23 13:33:07 -07:00
Jordan Borean
457bccf540 win_updates: add scheduled tasks back in for older hosts (#38708)
* win_updates: add scheduled tasks back in for older hosts

* Fixed up typo in category name error message

* Fixed up some minor issues after merge

* added changelog fragment

* Default to become but add override to use scheduled tasks

* Added basic unit tests for win_updates

* fix minor typos
2018-05-23 13:21:01 -07:00
Jordan Borean
f84f3de7c2
powershell: Respect remote_tmp path set by the user (#40210)
* powershell: Respect remote_tmp path set by the user

* Fixed up linting error and typo

* Added changelog
2018-05-23 07:12:32 +10:00
Jordan Borean
070a5557d1
always_run: removed deprecated always_run task option (#40470) 2018-05-23 07:10:36 +10:00
Robin Lee
d45b044992 Make xenserver_facts actually work (#35821)
* Get the str value of xmlrpc.client.DateTime

* get_all_records should be used instead of get_all

* Facts returned with 'ansible_facts'

* Remove some redundant code

* Add cheese as maintainer

* Add changelog entry
2018-05-22 13:31:35 -04:00
Ryan Brown
ed7d6d9c19
Add changelog for new GCP modules (#40542) 2018-05-22 11:35:29 -04:00
Matt Clay
c98043a4c0 New release v2.6.0a1 2018-05-21 17:26:16 -07:00
Jordan Borean
1ac180c74d
winrm: source user from options than remote_user (#40467)
* winrm: source user from options than remote_user

* fixed up mock for kerberos import

* Added changelog fragment

* get hostname from option as well
2018-05-22 09:36:48 +10:00
Matt Davis
e4edb2842a 2.6 changelog gen/version/root dir cleanup (#40421)
* patched in changelog gen stuff from stable-2.5
* Makefile updates
* release.py as single-source-of-truth
* Remove obsolete ansible-core-sitemap.xml file.
* Move ROADMAP.rst into README.rst.
* dynamic rpm changelog, zap old deb/rpm changelogs
* fix changelog in MANIFEST.in
* Remove obsolete hacking/update.sh script.
* Remove ref to deleted authors script.
* Remove ref to removed module-formatter script.
* Update headings to match script names.
* MANIFEST.in cleanup
* removed RELEASES.txt and versions.yml
* removed obsolete release generation playbook/bits (not used since 2.5)
* misc Makefile cleanup
* speculative changes to DEB versioning
* allow override of DEB_VERSION/DEB_RELEASE
2018-05-21 16:14:53 -07:00
Jordan Borean
db195831fd
win_environment: Added explicit check for null, empty string with state=present (#40468)
* win_environment: Added explicit check for null, empty string with state=present

* Added changelog fragment
2018-05-22 06:45:33 +10:00
Strahinja Kustudic
32d6a354d7 postgresql_user: set encrypted as default and fix empty password reporting changed (#36931)
* Set encrypted as default and fix empty password reporting changed

* Starting with Postgres 10 `UNENCRYPTED` passwords are removed and
because of that this module fails with the default `encrypted=no`.
Also encrypted passwords are suported since version 7.2
(https://www.postgresql.org/docs/7.2/static/sql-createuser.html) which
went EOL in 2007 and since 7.3 it is the default. Because of this it
makes a lot more sense to make `encrypted=yes` the default. This won't
break backward compatibility, the module would just update the user's
password in the DB in the hashed format and everything else will work
like before. It's also a security bad practice to store passwords in
plain text. fixes #25823
* There was also a bug with `encrypted=yes` and an empty password always
reported as changed.
* Improved documentation for `encrypted`/`password` parameters, and
removed some obsolete notes about passlib.

* Fix clearing user's password to work with all versions of Postgres

* Add tests for clearing the user password

* Fix documentation atfer rebase

* Add changelog fragment
2018-05-21 14:49:44 -05:00
Sam Doran
1c20029694
Fix ctrl+c in pause module and add tests (#40134)
* Fix all cases with pause and ctrl+c
 - naked:
	- pause:
 - with prompt
	- pause: prompt=hi
 - time wait
	- pause: seconds=60
 - time wait with prompt
	- pause: seconds=60 prompt=hi


Fixes #35372

* Use curses to control stdout
* Use curses to clear lines on interactive input
* Validate input for echo parameter and fail nicely if invalid
* Add integration tests for pause module using pexpect
* Use try except when trying to determine erase sequence to account for lack of TTY in containers in tests
* Improve output validation for regular paus test
* Accept two digit precision for pause length in test
* Check for seconds when seconds is specificed, minutes when minutes is specified
* Add test for no TTY mode

Co-authored by: Toshio Kuratomi <a.badger@gmail.com>
Co-authored by: Brian Coca <brian.coca+git@gmail.com>
2018-05-21 10:04:43 -04:00
Antoine Catton
39f9d3e4a6 Add the ability to specify an install_dir to the gem module (#38195)
* Add the ability to specify an install_dir to the gem module

* Add GEM_HOME when installing a non-global gem

* Add tests for custom gem path

* Fix sanity tests

* Add changelog entry

* Rebase and add tests for incorrect options

Co-authored by: Antoine Catton <devel@antoine.catton.fr>
2018-05-21 09:55:43 -04:00
Scott Buchanan
b12cf754f6 1Password lookup plugin (#37207)
* add pytest_cache to gitignore

* onepassword lookup plugin

* fix linter/style test complaints

* second pass at making pycodestyle happy

* use json module instead of jq

* update copyrights, license & version added

* fix python2 compatibility

* doh. fix spacing issue.

* use standard ansible exception

* remove potentially problematic stdin argument

* actually call assertion method

* add support for top-level fields

* make vault uuids pedantically consistent in fixture

* fix new style issues

* ability specify section & correct case handling

* improve error handling

* add onepassword_raw plugin

* Add maintainer info

* Move common code to module_utils/onepassword.py

* Load raw data JSON data for easier use in Ansible

* Put OnePass class back inside lookup plugin

There is no good place for sharing code across lookups currently.

* Remove debugging code in unit tests

* Patche proper module in raw unit tests

* Add changelog entry

Co-authored-by: Scott Buchanan <sbuchanan@ri.pn>
2018-05-17 17:29:47 -04:00
Artem Goncharov
db786b846f fixes issue 39472: (#40341)
With python 3.6 spwd.getspnam returns PermissionError instead of
KeyError if user does not have privileges
2018-05-17 17:22:40 -04:00
Jordan Borean
837aada4a8 win_updates: fix typo with download failure and whitelist on multiple updates (#40283) 2018-05-16 18:04:58 -04:00
Adam Patt
223a4c0685 Fixes #19392: allow commands to be specified as lists. new syntax is documented as well. (#40261)
* Fixes #19392: allow commands to be specified as lists.  new syntax is documented as well
2018-05-16 13:37:39 -07:00
Toshio Kuratomi
6227c2ac75
More file refactoring (#40114)
* Set src in the state functions rather than the toplevel

A good API should only require passing one version of a piece of data
around so do that for src

* Move the rewriting of path into additional_parameter_handling

When the path is a directory we can rewrite the path to be a file inside
of the directory

* Emit a warning when src is used with a state where it should be ignored
2018-05-16 10:41:11 -07:00
Toshio Kuratomi
cab0f21564 Add changelog for recursive copy fix 2018-05-16 10:37:05 -07:00
Toshio Kuratomi
95557b5df3 Changelog entry for https://github.com/ansible/ansible/pull/40188 2018-05-15 15:29:36 -07:00
Jordan Borean
d6eb642e88
win_template: fix issue where dest was specified as a directory (#39887) 2018-05-15 09:59:51 +10:00
Jordan Borean
e0813d7d47
become win: better error messages and docs update (#39936)
* become win: better error messages and docs update

* Fix syntax error and added changelog fragment
2018-05-15 09:33:36 +10:00
Toshio Kuratomi
abb353290c Add changelog for 40099 2018-05-14 13:23:04 -07:00
Toshio Kuratomi
3e64036684 Fix encoding issue when parsing plugin examples
This caused a non-fatal traceback when building, for example, the module
documentation for the debug module.
2018-05-08 12:21:52 -07:00
Matt Martz
efff75389d
Use updated task, instead of original, non-merged included_file._task (#39762)
* Used updated task, instead of original, non-merged included_file._task. Fixes #39637

* Add changelog entry
2018-05-07 10:01:35 -05:00
Jordan Borean
fc210a4584
base64 filter: Added ability to specify encoding (#39714)
* base64 filter: Added ability to specify encoding

* Added unicode chars for further testing

* Removed errors to keep previous behaviour in place

* Removed surrogate pairs due to issues loading YAML in CI
2018-05-05 09:16:58 +10:00
Matt Martz
1c4448666e
Add changelog entries for 2.6 include fixes (#39750) 2018-05-04 12:10:21 -05:00
Yuwei Zhou
9348809184 Fixes #37731 Create Internal Loadbalancers with azure_rm_loadbalancer, support SKU (#38077)
* create internal loadbalancer

* fix test

* remove duplicate test

* clean up

* fix doc

* lint

* add sku support

* update version

* change to the version the same as CLI

* add pip support sku

* fix lint

* fix test

* Update main.yml

* add changelog entry
2018-05-04 13:17:05 +08:00
Toshio Kuratomi
6b159fdb03 Fix for file module with recursive permission setting and broken symlinks
There was a traceback when setting permissions on a directory tree when
there were broken symlinks inside of the tree and follow=true.  chmod -R
ignores broken symlinks inside of the tree so we've fixed the file
module to do the same.

Fixes #39456
2018-05-03 17:54:34 -07:00
Toshio Kuratomi
4f664f8ff6
Fix for file module with symlinks to nonexistent target (#39635)
* Fix for file module with symlinks to nonexistent target

When creating a symlink to a nonexistent target, creating the symlink
would work but subsequent runs of the task would fail because it was
trying to operate on the target instead of the symlink.

Fixes #39558
2018-05-03 17:50:43 -07:00
Jordan Borean
f75b7a9437
win_get_url: Fixed a few issues with using FTP and added tests (#39646)
* win_get_url: Fixed a few issues with using FTP and added tests

* Fixed typo in docs
2018-05-04 08:39:37 +10:00
Sam Doran
5a6bdef76b Only change expiration date if it is different (#38885)
* Only change expiration date if it is different

Modify user_info() method to also return the password expiration.
Compare current and desired expiration times and only change if they are different.

* Improve formatting on user tests

* Add integration test for expiration

* Add changelog fragment

* Improve integration test

Skip macOS and use getent module for validating expiration date.

* Fix expiration change for FreeBSD

* Don't use datetime since the total_seconds method isn't available on CentOS 6

* Use better name for expiration index field

Use separate tasks for verifying expiration date on BSD

* Use calendar.timegm() rather than time.mktime()

calendar.timegm() is the inverse of time.gmtime() and returns a timestamp in UTC not localtime
Add tests that change the system timezone away from UTC

* Mark tests as destructive and use test for change status

* Fix account expiration for FreeBSD

Use DATE_FORMAT when setting expiration date on FreeBSD. Previously the argument passed to -e was an integer of days since epoch when the account will expire which was inserted directly into master.passwd. This value is interpreted as seconds since epoch by the system, meaning the account expiration was actually set to a few hours past epoch.

Greatly simply comparing desired  and current expiration time by using the first three values of the struct_time tuple rather than doing a whole bunch of manipulations of the seconds since epoch.
2018-05-01 11:19:01 -04:00
Toshio Kuratomi
81b2529159 Fix when template paths contain non-ascii chars and using the path in ansible_managed
Fixes #27262
2018-04-30 16:47:27 -07:00
Toshio Kuratomi
7c9122a89d Add changelog for file removal race 2018-04-30 09:12:40 -07:00
Jordan Borean
0d1daf4de8
Ansible.ModuleUtils.SID - allow SID as an input to allow people to specify well know SIDs instead of the name (#39400) 2018-04-30 16:18:25 +10:00
Toshio Kuratomi
d90c36e320 Add a changelog for filename encoding in template action fix 2018-04-28 09:17:16 -07:00
Jordan Borean
61bcf4740f
Added changelog fragment for win_file special char fix 2018-04-27 08:07:01 +10:00
Toshio Kuratomi
83c1cba511
Fixes for mode=preserve (#39343)
* Fixes for mode=preserve

* Document mode=preserve for template and copy
* Make mode=preserve work with remote_src for copy
* Make mode=preserve work for template
* Integration tests for copy & template mode=preserve

Fixes #39279

* Changed mode option in win_copy to hidden option as it doesn't reflect copy mode
2018-04-26 07:14:37 -07:00
Toshio Kuratomi
a5e33969b1 Add changelog entry for winrm encoding fix 2018-04-25 15:00:11 -07:00
Jordan Borean
f8853d83e3
windows: removed deprecated features in 2.6 (#38930)
* windows: removed deprecated features in 2.6

* Comma surgery.
2018-04-26 06:13:37 +10:00
Toshio Kuratomi
f332151f59 Fix copy to only follow symlinks for files in the non-recursive case
Revert "**Temporary**"

This reverts commit 28b86b1148.

We don't need this now that copy has been fixed
2018-04-20 10:04:24 -07:00
Toshio Kuratomi
f5cc4acc53 Add changelog entry for grafana base64 port 2018-04-17 06:51:59 -07:00
Matt Davis
f25603d101 bring changelog/frgaments to devel
* 2.6.0a1 catchup is empty on purpose, will fill in with all notable dev commits as we get closer
2018-04-09 17:56:55 -07:00