Puppet Class: tripleo::profile::base::nova::migration::proxy

Defined in:
manifests/profile/base/nova/migration/proxy.pp

Overview

Parameters:

  • step (Any) (defaults to: Integer(hiera('step')))
  • ssh_private_key (Any) (defaults to: '')
  • target_host (Any) (defaults to: hiera('fqdn_internal_api', '127.0.0.1'))
  • target_port (Any) (defaults to: 22)


39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'manifests/profile/base/nova/migration/proxy.pp', line 39

class tripleo::profile::base::nova::migration::proxy (
  $step            = Integer(hiera('step')),
  $ssh_private_key = '',
  $target_host  = hiera('fqdn_internal_api', '127.0.0.1'),
  $target_port  = 22
) {

  include tripleo::profile::base::nova::migration

  if $step >= 4 {
    if !empty($ssh_private_key) {
      class { 'tripleo::profile::base::nova::migration::target':
        step            => $step,
        wrapper_command => "/bin/ssh \
-p ${target_port} \
-i /etc/nova/migration/proxy_identity \
-o BatchMode=yes \
-o UserKnownHostsFile=/dev/null \
nova_migration@${target_host} \
\$SSH_ORIGINAL_COMMAND"
      }

      $migration_identity = $ssh_private_key
      $migration_identity_ensure = 'present'
    }
    else {
      $migration_identity = ''
      $migration_identity_ensure = 'absent'
    }

    file { '/etc/nova/migration/proxy_identity':
      ensure  => $migration_identity_ensure,
      content => $migration_identity,
      mode    => '0600',
      owner   => 'nova_migration',
      group   => 'nova_migration',
      require => Package['openstack-nova-migration']
    }
  }
}