community.general/lib/ansible/modules/system
Marius Gedminas f97d00fbad user: don't generate SSH keys in check mode
Fixes https://github.com/ansible/ansible/issues/11768

Test plan:

- (in a Vagrant VM) created a user 'bob' with no ssh key
- ran the following playbook in check mode:

    ---
    - hosts: trusty
      tasks:
        - user: name=bob state=present generate_ssh_key=yes

- saw that ansible-playbook reported "changes=1"
- saw that /home/bob/.ssh was still absent
- ran the playbook for real
- saw that /home/bob/.ssh was created
- ran the playbook in check mode again
- saw that ansible-playbook reported no changes
- tried a variation with a different username for a user that didn't
  exist: ansible-playbook --check worked correctly (no errors, reported
  "changed")
2016-12-08 11:23:33 -05:00
..
__init__.py package files 2016-12-08 11:22:22 -05:00
authorized_key.py Don't fail in check_mode if user exists 2016-12-08 11:23:33 -05:00
cron.py Add disabled option to cron module 2016-12-08 11:23:29 -05:00
group.py Check if the gid is set 2016-12-08 11:23:22 -05:00
hostname.py Add Solaris support in hostname module 2016-12-08 11:23:26 -05:00
mount.py mount: Support for Check-Mode 2016-12-08 11:23:24 -05:00
ping.py Proper author info for all remaining modules 2016-12-08 11:23:07 -05:00
seboolean.py Proper author info for all remaining modules 2016-12-08 11:23:07 -05:00
selinux.py Proper author info for all remaining modules 2016-12-08 11:23:07 -05:00
service.py made continue into a pass (there was no loop) 2016-12-08 11:23:30 -05:00
setup.py changed verbose override variable 2016-12-08 11:23:27 -05:00
sysctl.py Proper author info for all remaining modules 2016-12-08 11:23:07 -05:00
user.py user: don't generate SSH keys in check mode 2016-12-08 11:23:33 -05:00