Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - name: expect module
- hosts: all
- vars:
- user: "anis-user"
- password: "somepassword_)?"
- tasks:
- - name: testing expect_ckan
- expect:
- command: "{{playbook_dir}}/expecting_ckan.sh {{user}}"
- responses:
- 'Create new user: .*\? \[y\/n\]': 'y'
- 'Password': '{{password}}'
- 'Confirm password': '{{password}}'
- echo: yes
- register: expect_dumps
- changed_when: "'Added' in expect_dumps.stdout"
- failed_when: "expect_dumps.rc != 0"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement