I would really appreciate any help. I am baffled on why the task claims to 
be successful, but the /etc/security/password file is not modified.

On Tuesday, September 23, 2014 10:50:22 AM UTC-6, Mark wrote:
>
> This process seems to be elusive for AIX.  I have tried several hash types 
> and string substitutions. Any help would be much appreciated.
>
> Below is the run of the playbook.
>
> ansible-playbook account.yml -i./hosts -k -K
> SSH password:
> sudo password [defaults to SSH password]:
> Enter new password:
> confirm Enter new password:
>
> PLAY [all] 
> ********************************************************************
>  
> GATHERING FACTS 
> ***************************************************************
> ok: [testhost]
>
> TASK: [Show Hash Value] 
> *******************************************************
> ok: [testhost] => {
>     "msg": "new_password 
> $6$rounds=40000$VDQKJU4ZPdhvfwi0$Gk7S48sb7WqIHtJnE/tFvkHmAUc4MOys8pGDLgd8/lJ2s9d9wByGrNYiFVufzCZmBd9N3HArf0UmxAX8ES/i81"
> }
>
> TASK: [Update account on AIX] 
> *************************************************
> changed: [testhost]
>
> PLAY RECAP 
> ********************************************************************
> testhost        : ok=2    changed=1    unreachable=0    failed=0
>
> --------
> Confiuguration information
> -----------------
>
> Master: Redhat 6.5 python: 2.6.6 Ansible 1.7.1 
> Client: AIX 7.1, python 2.7.5
>
> playbook
> ------------
> account.yml
> --
> - hosts: all
>   sudo: yes
>   gather_facts: true
> #
> # tasks file for users
> #
>   vars_prompt:
>   - name: 'new_password'
>     prompt: "Enter new password"
>     private: yes
>     confirm: yes
>     encrypt: "sha512_crypt"
>  
>   tasks:
>   - name: Show Hash Value
>     action: debug msg="new_password {{ new_password }}"
>  
>   - name: Update account on AIX
>     user: name=test
>           password={{ new_password | replace("$1$", "{smd5}", 1)| 
> replace("$5$", "{ssha256}", 1) | replace("$6$", "{ssha512}", 1) }}
>     when: ansible_os_family == "AIX"
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c4981dc6-b410-4422-9d4d-6032fcb8efc2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to