Drop unneeded become overrides

We add become overrides on the task level which neglect provided by
user options in favor of quite narrow usecase. As a result, role can not
be run as a non-root user in cases where venv_build_host is not localhost

Removing become override potenially unblocks running OSA with non-root
user on hosts.

Change-Id: I663bdb1bcc60fec0d9efc55cbb1b2a0c566ab2ab
This commit is contained in:
Dmitriy Rabotyagov 2023-10-11 15:18:43 +02:00
parent 965cad09fa
commit 3d1740bde2
3 changed files with 0 additions and 4 deletions

View File

@ -15,7 +15,6 @@
- name: Slurp up the constraints file for later re-deployment - name: Slurp up the constraints file for later re-deployment
delegate_to: "{{ venv_build_host }}" delegate_to: "{{ venv_build_host }}"
become: "{{ venv_build_host == 'localhost' }}"
slurp: slurp:
src: "{{ _venv_build_requirements_prefix }}-constraints.txt" src: "{{ _venv_build_requirements_prefix }}-constraints.txt"
register: _constraints_file_slurp register: _constraints_file_slurp

View File

@ -14,14 +14,12 @@
# limitations under the License. # limitations under the License.
- name: Ensure local facts folder exists - name: Ensure local facts folder exists
become: true
file: file:
path: /etc/ansible/facts.d path: /etc/ansible/facts.d
state: directory state: directory
mode: "0755" mode: "0755"
- name: Record the necessary facts - name: Record the necessary facts
become: true
ini_file: ini_file:
dest: "/etc/ansible/facts.d/{{ venv_facts_dest }}.fact" dest: "/etc/ansible/facts.d/{{ venv_facts_dest }}.fact"
section: "{{ item.section }}" section: "{{ item.section }}"

View File

@ -15,7 +15,6 @@
- name: Build the wheels on the build host - name: Build the wheels on the build host
delegate_to: "{{ venv_build_host }}" delegate_to: "{{ venv_build_host }}"
become: "{{ venv_build_host == 'localhost' }}"
block: block:
- name: Install distro packages for wheel build - name: Install distro packages for wheel build
vars: vars: