You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# Verify requiretty support
|
|
|
|
|
|
|
|
- name: integration/become/sudo_requiretty.yml
|
|
|
|
hosts: test-targets
|
|
|
|
any_errors_fatal: true
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
- name: Verify we can login to a non-passworded requiretty account
|
|
|
|
shell: whoami
|
|
|
|
become: true
|
|
|
|
become_user: mitogen__require_tty
|
|
|
|
register: out
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- out.stdout == 'mitogen__require_tty'
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
|
|
# ---------------
|
|
|
|
|
|
|
|
- name: Verify we can login to a passworded requiretty account
|
|
|
|
shell: whoami
|
|
|
|
become: true
|
|
|
|
become_user: mitogen__require_tty_pw_required
|
|
|
|
vars:
|
|
|
|
ansible_become_pass: require_tty_pw_required_password
|
|
|
|
register: out
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- out.stdout == 'mitogen__require_tty_pw_required'
|
|
|
|
when: is_mitogen
|