Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch tests from sudo to become. #17694

Merged
merged 1 commit into from
Sep 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/integration/amazon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
- hosts: ec2
gather_facts: no
remote_user: ec2-user
sudo: true
become: true
roles:
- { role: ec2_elb_instance_setup, tags: test_ec2_elb }

Expand Down
4 changes: 2 additions & 2 deletions test/integration/roles/test_copy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@

- name: overwrite the file as user nobody
copy: dest=/tmp/worldwritable/file.txt content="baz"
sudo: yes
sudo_user: nobody
become: yes
become_user: nobody
register: copy_result7

- name: assert the file was overwritten
Expand Down
4 changes: 2 additions & 2 deletions test/integration/roles/test_ec2_elb/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
- name: "shutdown the apache service on the first instance ({{ec2_provision_result.instances[0].public_ip}})"
service: name=httpd state=stopped
remote_user: "ec2-user"
sudo: yes
sudo_user: root
become: yes
become_user: root
delegate_to: "{{ec2_provision_result.instances[0].public_ip}}"

- name: assert that the httpd service was stopped
Expand Down
8 changes: 4 additions & 4 deletions test/integration/roles/test_fetch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

- debug: var=fetched

# TODO: check the sudo and non-sudo forms of fetch because in one form we'll do
# the get method of the connection plugin and in the sudo case we'll use the
# TODO: check the become and non-become forms of fetch because in one form we'll do
# the get method of the connection plugin and in the become case we'll use the
# fetch module.

- name: diff what we fetched with the original file
Expand Down Expand Up @@ -82,8 +82,8 @@

- debug: var=fetched

# TODO: check the sudo and non-sudo forms of fetch because in one form we'll do
# the get method of the connection plugin and in the sudo case we'll use the
# TODO: check the become and non-become forms of fetch because in one form we'll do
# the get method of the connection plugin and in the become case we'll use the
# fetch module.

- name: diff what we fetched with the original file
Expand Down
4 changes: 2 additions & 2 deletions test/integration/roles/test_file/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@

- name: Ask to create a file without enough perms to change ownership
file: path=/tmp/worldwritable/baz.txt state=touch owner=root
sudo: yes
sudo_user: nobody
become: yes
become_user: nobody
register: chown_result
ignore_errors: True

Expand Down