diff --git a/README.md b/README.md index 67d317f..5f14c7e 100644 --- a/README.md +++ b/README.md @@ -73,15 +73,16 @@ the modification, for example: The following playbook will produce a modified image with the tag `:latest-updated` which will do a yum update using the host's /etc/yum.repos.d. The yum update will only occur if there are differences between host and image -package versions. +package versions. In this playbook the tasks_from is set as a variable instead +of an `import_role` parameter. - hosts: localhost tasks: - name: include tripleo-modify-image import_role: name: tripleo-modify-image - tasks_from: yum_update.yml vars: + tasks_from: yum_update.yml source_image: docker.io/tripleomaster/centos-binary-nova-api:latest compare_host_packages: true yum_repos_dir_path: /etc/yum.repos.d diff --git a/tasks/main.yml b/tasks/main.yml index ed97d53..fe3a172 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1 +1,9 @@ ---- +- name: Set default tasks_from + set_fact: + tasks_from: modify_image.yaml + when: tasks_from is undefined + +- name: Running tasks from {{ tasks_from }} + include_role: + name: tripleo-modify-image + tasks_from: "{{ tasks_from }}"