playbooks: Convert venv_python_path to proper role

The venv_python_path tasks were in the roles directroy but we were
including it as a normal file with a list of tasks so it was not really
an Ansible role. This does not work well when we use the Bifrost roles
outside of bifrost since Ansible does not know where to find this file
for inclusion. Our best chance is to convert it to a simple role which
can be statically imported.

Change-Id: I82fdfe48f9f2eb631165ab630157bc378ddc631d
This commit is contained in:
Markos Chandras 2018-10-16 09:15:15 +01:00
parent 95c3103d97
commit beb4e60614
8 changed files with 14 additions and 7 deletions

View File

@ -13,7 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
- include: roles/common/venv_python_path.yml
- import_role:
name: venv_python_path
- name: Ensure required packages are installed
package:
name: "{{ dib_host_required_packages }}"

View File

@ -15,7 +15,8 @@
---
# This is overly complex, however get_url will always re-retrieve the file
# if it already exists, and this is to prevent that behavior.
- include: roles/common/venv_python_path.yml
- import_role:
name: venv_python_path
- name: "Test if IPA kernel is present"
stat: path={{ ipa_kernel }}

View File

@ -13,7 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
- include: roles/common/venv_python_path.yml
- import_role:
name: venv_python_path
- name: Create {{ ipxe_dir }}
file:

View File

@ -13,7 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
- include: roles/common/venv_python_path.yml
- import_role:
name: venv_python_path
- name: "Update Package Cache"
apt: update_cache=yes

View File

@ -39,7 +39,8 @@
ironic.keystone.default_username is undefined or
ironic.keystone.default_password is undefined
- include: roles/common/venv_python_path.yml
- import_role:
name: venv_python_path
- name: "Ensure service project is present"
os_project:

View File

@ -38,7 +38,8 @@
ironic_inspector.keystone.default_username is undefined or
ironic_inspector.keystone.default_password is undefined
- include: roles/common/venv_python_path.yml
- import_role:
name: venv_python_path
- name: "Create service user for ironic-inspector"
os_user:

View File

@ -11,7 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
- include: roles/common/venv_python_path.yml
- import_role:
name: venv_python_path
- name: "Install packages"
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"