You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And it changes the user for real each time even though I have the --check option.
Additional IRC info:
[23:12] You mentioned that you think the SunOS user module does not support check mode.
[23:13] @jtanner yes
[23:13] Can we be sure of that? What do I need to do to get to the bottom of this? I want to get to the bottom of this so I can get my confidence level back up to continue using Ansible in my production environment
[23:13] @jtanner well, are you connecting to sunos clients?
[23:14] Yes I am, it's a Solaris 10 zone even
[23:15] "ansible_architecture": "sun4v", "ansible_container": "zone", "ansible_distribution": "Solaris", "ansible_distribution_release": "Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC", "ansible_distribution_version": "10",
[23:16] @jtanner the sunos class in the user mode makes zero references to self.module.check_mode so it's probably in need of a refactor
[23:16] @jtanner user module*
[23:17] @jtanner and it's been that way for over a year 3bab27ab
[23:17] @jtanner perhaps check mode wasn't around when romeo wrote the class?
[23:18] @jtanner i can probably fix it pretty quick, but i need a bug first
The check mode should not make changes to the user module.
The text was updated successfully, but these errors were encountered:
The check mode for the user module does not work and still makes changes to SunOS/Solaris hosts.
Using ansible 1.3.4
Here are steps to reproduce the problem:
cat site.yml
roles:
roles:
roles:
roles:
My users-sysadmins role:
ls -lR
.:
total 20
drwxrwxr-x 2 root root 4096 Nov 27 19:15 files
drwxrwxr-x 2 root root 4096 Nov 27 19:14 handlers
drwxrwxr-x 2 root root 4096 Dec 4 15:43 tasks
drwxrwxr-x 2 root root 4096 Nov 27 19:15 templates
drwxrwxr-x 2 root root 4096 Nov 27 19:15 vars
./files:
total 0
./handlers:
total 0
-rw-rw-r-- 1 root root 0 Nov 27 19:14 main.yml
./tasks:
total 4
-rw-rw-r-- 1 root root 424 Dec 4 15:43 main.yml
./templates:
total 0
./vars:
total 0
-rw-rw-r-- 1 root root 0 Nov 27 19:15 main.yml
The yml file for the role:
cat tasks/main.yml
Sysadmin 1
group: name=sysadmin1 gid=524 state=present
tags: sysadmin1
user: name=sysadmin1 comment="Sysadmin 1" uid=559 append=yes createhome=yes group=sysadmin1 groups=sysadmin home=/export/home/sysadmin1 shell=/usr/bin/bash
tags: sysadmin1
And I call the playbook like this:
ansible-playbook /etc/ansible/site.yml -i /etc/ansible/dev -u sysadmin1 -k -s -K --limit=HOSTWITHPROBLEM --tags=sysadmin1 --check
And it changes the user for real each time even though I have the --check option.
Additional IRC info:
[23:12] You mentioned that you think the SunOS user module does not support check mode.
[23:13] @jtanner yes
[23:13] Can we be sure of that? What do I need to do to get to the bottom of this? I want to get to the bottom of this so I can get my confidence level back up to continue using Ansible in my production environment
[23:13] @jtanner well, are you connecting to sunos clients?
[23:14] Yes I am, it's a Solaris 10 zone even
[23:15] "ansible_architecture": "sun4v", "ansible_container": "zone", "ansible_distribution": "Solaris", "ansible_distribution_release": "Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC", "ansible_distribution_version": "10",
[23:16] @jtanner the sunos class in the user mode makes zero references to self.module.check_mode so it's probably in need of a refactor
[23:16] @jtanner user module*
[23:17] @jtanner and it's been that way for over a year 3bab27ab
[23:17] @jtanner perhaps check mode wasn't around when romeo wrote the class?
[23:18] @jtanner i can probably fix it pretty quick, but i need a bug first
The check mode should not make changes to the user module.
The text was updated successfully, but these errors were encountered: