{"id":17901681,"url":"https://github.com/steveb/ansible-role-tripleo-modify-image","last_synced_at":"2025-04-03T05:26:34.177Z","repository":{"id":66670017,"uuid":"131541802","full_name":"steveb/ansible-role-tripleo-modify-image","owner":"steveb","description":null,"archived":false,"fork":false,"pushed_at":"2018-05-23T01:15:16.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T19:34:27.704Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steveb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-30T00:40:27.000Z","updated_at":"2018-05-23T01:15:17.000Z","dependencies_parsed_at":"2023-02-23T10:00:55.064Z","dependency_job_id":null,"html_url":"https://github.com/steveb/ansible-role-tripleo-modify-image","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steveb%2Fansible-role-tripleo-modify-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steveb%2Fansible-role-tripleo-modify-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steveb%2Fansible-role-tripleo-modify-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steveb%2Fansible-role-tripleo-modify-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steveb","download_url":"https://codeload.github.com/steveb/ansible-role-tripleo-modify-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246941667,"owners_count":20858360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T16:03:07.653Z","updated_at":"2025-04-03T05:26:34.124Z","avatar_url":"https://github.com/steveb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TripleO Modify Image #\n\nA role to allow modification to container images built for the TripleO project.\n\n## Role Variables ##\n\n**Variables used for modify image**\n\n| Name              | Default Value       | Description          |\n|-------------------|---------------------|----------------------|\n| `source_image` | `[undefined]` | Mandatory fully qualified reference to the source image to be modified. The supplied Dockerfile will be copied and modified to make the FROM directive match this variable. |\n| `modify_dir_path` | `[undefined]` | Mandatory path to the directory containing the Dockerfile to modify the image |\n| `modified_append_tag` | `date +-modified-%Y%m%d%H%M%S` | String to be appended after the tag to indicate this is a modified version of the source image. |\n| `target_image` | `[undefined]` | If set, the modified image will be tagged with `target_image + modified_append_tag`. If `target_image` is not set, the modified image will be tagged with `source_image + modified_append_tag`. If the purpose of the image is not changing, it may be enough to rely on the `source_image + modified_append_tag` tag to identify that this is a modified version of the source image. |\n\n\n**Variables used for yum update**\n\n| Name              | Default Value       | Description          |\n|-------------------|---------------------|----------------------|\n| `source_image` | `[undefined]` | See modify image variables |\n| `modified_append_tag` | `date +-modified-%Y%m%d%H%M%S` | See modify image variables |\n| `target_image` | `''` | See modify image variables |\n| `update_repo` | `''` | If set, packages from this repo will be updated. Other repos will only be used for dependencies of these updates.|\n| `yum_repos_dir_path` | `None` | Optional path of directory to be used as `/etc/yum.repos.d` during the update |\n| `compare_host_packages` | `False` | If `True`, skip yum update when package versions match host package versions |\n\n## Requirements ##\n\n - ansible \u003e= 2.4\n - python \u003e= 2.6\n - docker-py \u003e= 1.7.0\n - Docker API \u003e= 1.20\n\n## Dependencies ##\n\nNone\n\n## Example Playbooks ##\n\n### Modify Image ###\n\nThe following playbook will produce a modified image with the tag\n`:latest-modified-\u003ctimestamp\u003e` based on the Dockerfile in the custom directory\n`/path/to/example_modify_dir`.\n\n    - hosts: localhost\n      tasks:\n      - name: include tripleo-modify-image\n        import_role:\n          name: tripleo-modify-image\n          tasks_from: modify_image.yml\n        vars:\n          source_image: docker.io/tripleomaster/centos-binary-nova-api:latest\n          modify_dir_path: /path/to/example_modify_dir\n\nThe directory `example_modify_dir` contains the `Dockerfile` which will perform\nthe modification, for example:\n\n    # This will be replaced in the file Dockerfile.modified\n    FROM centos-binary-nova-api\n\n    # switch to root to install packages\n    USER root\n\n    # install packages\n    RUN curl \"https://bootstrap.pypa.io/get-pip.py\" -o \"/tmp/get-pip.py\"\n    RUN python /tmp/get-pip.py\n\n    # switch the container back to the default user\n    USER nova\n\n### Yum update ###\n\nThe following playbook will produce a modified image with the tag\n`:latest-updated` which will do a yum update using the host's /etc/yum.repos.d.\nThe yum update will only occur if there are differences between host and image\npackage versions. In this playbook the tasks_from is set as a variable instead\nof an `import_role` parameter.\n\n    - hosts: localhost\n      tasks:\n      - name: include tripleo-modify-image\n        import_role:\n          name: tripleo-modify-image\n        vars:\n          tasks_from: yum_update.yml\n          source_image: docker.io/tripleomaster/centos-binary-nova-api:latest\n          compare_host_packages: true\n          yum_repos_dir_path: /etc/yum.repos.d\n          modified_append_tag: updated\n\n## License ##\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteveb%2Fansible-role-tripleo-modify-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteveb%2Fansible-role-tripleo-modify-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteveb%2Fansible-role-tripleo-modify-image/lists"}