Skip to content

Instantly share code, notes, and snippets.

@madAndroid
Created January 22, 2015 14:58
Show Gist options
  • Save madAndroid/59fe07ac97935b4df751 to your computer and use it in GitHub Desktop.
Save madAndroid/59fe07ac97935b4df751 to your computer and use it in GitHub Desktop.
if $sftp_is_default {
$client_dir = "${m3_sftp::params::sftp_client_dir}/${brand_name}/default"
concat::fragment { "ftppasswd__${user_name}":
target => "${passwd_file}",
content => template("m3_sftp/conf/ftpd.passwd.erb"),
order => 10,
}
file { ["/srv/ftp/clients/${brand_name}", "/srv/ftp/clients/${brand_name}/default"]:
ensure => directory,
owner => $user_uid,
group => $user_gid,
mode => 751,
}
file {[ "/srv/ftp/clients/${brand_name}/default/new_ack",
"/srv/ftp/clients/${brand_name}/default/new_e2b",
"/srv/ftp/clients/${brand_name}/default/manual_e2b",
]:
ensure => directory,
owner => $user_uid,
group => $user_gid,
mode => 771,
require => File["/srv/ftp/clients/${brand_name}/default"],
}
}
@jeanvisser
Copy link

if $sftp_is_default {

    $client_dir     = "${m3_sftp::params::sftp_client_dir}/${brand_name}/default"

    concat::fragment { "ftppasswd__${user_name}":
        target          => "${passwd_file}",
        content         => template("m3_sftp/conf/ftpd.passwd.erb"),
        order           => 10,
      }

    file { ["/srv/ftp/clients/${brand_name}", "/srv/ftp/clients/${brand_name}/default"]:
        ensure          => directory,
        owner           => $user_uid,
        group           => $user_gid,
        mode            => 751,
      }

    file {[ "/srv/ftp/clients/${brand_name}/default/new_ack",
            "/srv/ftp/clients/${brand_name}/default/new_e2b",
            "/srv/ftp/clients/${brand_name}/default/manual_e2b",
      ]:
        ensure          => directory,
        owner           => $user_uid,
        group           => $user_gid,
        mode            => 771,
        require         => File["/srv/ftp/clients/${brand_name}/default"],
      }
}

@jeanvisser
Copy link

if $sftp_is_default {

    $client_dir     = "${m3_sftp::params::sftp_client_dir}/${brand_name}/default"

    concat::fragment { "ftppasswd__${user_name}":
        target          => "${passwd_file}",
        content         => template("m3_sftp/conf/ftpd.passwd.erb"),
        order           => 10,
    }

    file { ["/srv/ftp/clients/${brand_name}", "/srv/ftp/clients/${brand_name}/default"]:
        ensure          => directory,
        owner           => $user_uid,
        group           => $user_gid,
        mode            => 751,
    }

    file {[ "/srv/ftp/clients/${brand_name}/default/new_ack",
            "/srv/ftp/clients/${brand_name}/default/new_e2b",
            "/srv/ftp/clients/${brand_name}/default/manual_e2b",
        ]:
        ensure          => directory,
        owner           => $user_uid,
        group           => $user_gid,
        mode            => 771,
        require         => File["/srv/ftp/clients/${brand_name}/default"],
    }
}

@jeanvisser
Copy link

if $sftp_is_default {

    $client_dir     = "${m3_sftp::params::sftp_client_dir}/${brand_name}/default"

    concat::fragment { "ftppasswd__${user_name}":
        target          => "${passwd_file}",
        content         => template("m3_sftp/conf/ftpd.passwd.erb"),
        order           => 10,
    }

    file {["/srv/ftp/clients/${brand_name}", "/srv/ftp/clients/${brand_name}/default"]:
        ensure          => directory,
        owner           => $user_uid,
        group           => $user_gid,
        mode            => 751,
    }

    file {[ "/srv/ftp/clients/${brand_name}/default/new_ack",
            "/srv/ftp/clients/${brand_name}/default/new_e2b",
            "/srv/ftp/clients/${brand_name}/default/manual_e2b",
        ]:
        ensure          => directory,
        owner           => $user_uid,
        group           => $user_gid,
        mode            => 771,
        require         => File["/srv/ftp/clients/${brand_name}/default"],
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment