tripleo-operator-ansible/roles/tripleo_overcloud_admin_aut...
Cédric Jeanneret 7ae7c668ed Ensure we export result only if we have an stdout
I841743fb6c2c24e4a3d86598f99322022b27804d introduced a sort of "dry-run"
capability to the operators, but it didn't take care of the possible
exposure of the shell stdout in a fact. Thus, if you enabled the
generate_scripts_only feature, your ansible run would fail on the
exposure, since the variable it refers to will not exist.

Change-Id: I07225e6b82199cf15860e55db6995c994da65931
2020-05-15 15:43:20 +02:00
..
defaults Add new parameter in order to get a kind of dry-run 2020-05-12 15:14:47 +02:00
meta Add overcloud admin authorize role 2020-02-28 18:17:00 -07:00
molecule/default Add overcloud admin authorize role 2020-02-28 18:17:00 -07:00
tasks Ensure we export result only if we have an stdout 2020-05-15 15:43:20 +02:00
tests Add overcloud admin authorize role 2020-02-28 18:17:00 -07:00
README.md Add new parameter in order to get a kind of dry-run 2020-05-12 15:14:47 +02:00

README.md

tripleo_overcloud_admin_authorize

A role to run the overcloud admin authorize action.

Requirements

None.

Role Variables

  • tripleo_overcloud_admin_authorize_debug: (Boolean) Flag used to enable the debug version of commands. Default: false
  • tripleo_overcloud_admin_authorize_generate_scripts: (Boolean) Write out a shell script that can be used to reproduce the command being executed. By default uses the value of tripleo_generate_scripts or False if tripleo_generate_scripts is not defined.
  • tripleo_overcloud_admin_authorize_generate_scripts_only: (Boolean) Do not run the actual command - to be used in conjonction with tripleo_overcloud_admin_authorize_generate_scripts. By default uses the value of tripleo_generate_scripts_only or False if tripleo_generate_scripts_only is not defined.
  • tripleo_overcloud_admin_authorize_home_dir: (String) Location to execute the command in. Default: "{{ ansible_env.HOME }}"
  • tripleo_overcloud_admin_authorize_os_cloud: (String) OS_CLOUD value to use when running the command. If tripleo_os_cloud is defined, it will be the default. Otherwise the default is ''. This variable takes precedence over tripleo_overcloud_admin_authorize_rc_file.
  • tripleo_overcloud_admin_authorize_output_dir: (String) Directory to output ansible.cfg and ansible.log files. If not specified, will output to the tripleo_overcloud_admin_authorize_home_dir.
  • tripleo_overcloud_admin_authorize_poll: (Integer) Number of seconds to wait between each checks to see if the deployment command has completed. Default: 10
  • tripleo_overcloud_admin_authorize_rc_file: (String) Path to the credential file to use. If tripleo_rc_file is defined, it will be the default. Default: "{{ ansible_env.HOME }}/overcloudrc"
  • tripleo_overcloud_admin_authorize_ssh_enable_timeout: (Integer) Timeout for the ssh enable process to finish (Train version only)
  • tripleo_overcloud_admin_authorize_ssh_key: (String) Path to ssh key for the overcloud nodes.
  • tripleo_overcloud_admin_authorize_ssh_network: (String) Network name to use for ssh access to the overcloud nodes.
  • tripleo_overcloud_admin_authorize_ssh_port_timeout: (Integer) Timeout for teh ssh port to become active.
  • tripleo_overcloud_admin_authorize_ssh_user: (String) User for ssh access to overcloud nodes
  • tripleo_overcloud_admin_authorize_stack: (String) Name or ID of the heat stack
  • tripleo_overcloud_admin_authorize_timeout: (Integer) Number in seconds to wait for the ansible execution of the deployment command to finish. Default: 3600

Output Variables

  • tripleo_overcloud_admin_authorize_output: (String) The command standard output.
  • tripleo_overcloud_admin_authorize_result: Ansible shell execution results

Dependencies

None.

Example Playbook

Example execution playbook

- hosts: undercloud
  gather_facts: true
  tasks:
    - name: Deploy the ssh key for the overcloud
      import_role:
        name: tripleo_overcloud_admin_authorize
      vars:
        tripleo_overcloud_admin_authorize_stack: overcloud
        tripleo_overcloud_admin_authorize_ssh_user: admin
        tripleo_overcloud_admin_authorize_ssh_key: "/home/stack/my_key.pub"

License

Apache-2.0