Alex Schultz d2b23da366 Add ability to write scripts
Add the ability to write out the command being exected to a script for
the roles that aren't single action list/show/remove/etc as they would
not be something to rerun and are really for ansible-only control.

Change-Id: I11ad3c12de21fe0522d13f966783cb413b661646
2020-04-15 16:25:27 -06:00

2.1 KiB

tripleo_container_image_prepare

A role to perform the container image prepare action.

Requirements

None.

Role Variables

  • tripleo_container_image_prepare_become: (Boolean) Run the command as root. This needs to be true when uploading to the local undercloud registry. Default: true
  • tripleo_container_image_prepare_cleanup: (String) Cleanup behavior for local images left after upload. Can be one of full, partial, or none. Default is not set.
  • tripleo_container_image_prepare_debug: (Boolean) Flag to print out the prepare command. Default: False
  • tripleo_container_image_prepare_dry_run: (Boolean) Perform a dry run upload which will not perform any push, pull or modify operations. The environment file will still be populaged. Default: false
  • tripleo_container_image_prepare_environment_files: (List) List of environment files. Default: []
  • tripleo_container_image_prepare_environment_directory: (List) Directories containing environment files. Should not be used if tripleo_container_image_prepare_environment_files is defined. Default: []
  • tripleo_container_image_prepare_home_dir: (String) Home directory for the undercloud user. Default: "{{ ansible_env.HOME }}"
  • tripleo_container_image_prepare_output_env_file: (String) File to write heat environment file which specifies all image parameters. Default is not set.
  • tripleo_container_image_prepare_output_roles_file: (String) Roles file path on the remote system. Default is not set.
  • tripleo_container_image_prepare_timeout: (Number) Amount of time to wait for the command to conplete. Default: 1800

Output Variables

  • tripleo_container_image_prepare_result: Ansible shell execution results

Dependencies

None.

Example Playbook

Example container prepare execution playbook

- hosts: undercloud
  gather_facts: true
  tasks:
    - name: Run container prepare
      import_role:
        name: tripleo_container_image_prepare
      vars:
        tripleo_container_image_prepare_files:
          - /home/stack/container-image-prepare.yaml

License

Apache-2.0