0
私はPuppetの新しいユーザーです。以下のタスクを実行するためにweb01.ppファイルを作成しました。パペット:エラー:実行できませんでした:ファイルマニフェスト/ web01.ppを見つけることができませんでした。
nginxのサーバーにインストールし、クライアント・マシンに別のディレクトリにsudo権限を持つ
- 追加ユーザーを一つのディレクトリからの私すでに作成されたインデックスファイルをコピー
のconfigure nginxのサーバー
my web01 fジル
node 'web01.example.com' {
package { 'apache2.2-common':
ensure => absent,
}
package { 'nginx':
ensure => installed,
require => Package['apache2.2-common'],
}
service { 'nginx':
ensure => running,
require => Package['nginx'],
}
exec { 'mkdir -p /var/www/web01':
command => '/bin/mkdir -p /var/www/web01'
}
exec { 'cp -rf /root/site/index.php /var/www/web01/':
command => '/bin/cp -rf /root/site/index.php /var/www/web01/'
}
file { "/var/www/web01":
source => "puppet:///files/web01.conf",
notify => Service['nginx'],
}
user { 'newuser':
# (namevar) The user name
name => 'newuser',
# The user's status: 'present','absent','role'
ensure => 'present',
# Eventual user's secondary groups (use array for many)
groups => [ 'sudo' ],
# The user's password. As it appears in /etc/shadow
# Use single quotes to avoid unanted evaluation of $* as variables
# Typical users' attributes
shell => '/bin/bash',
home => '/home/newuser',
sshkeytype => "ssh-rsa",
sshkey => "AAAA..."
}
}
は、その後、私は
/etc/puppet/files/web01.conf
を作成し、これらのコマンドに
puppet apply manifests/web01.pp
を使用して
Error: Could not run: Could not find file manifests/web01.pp
このエラーが出るようになりますと、私は逃した何かにあります適用するように設定しますか?
あなたは人形は、[例](https://docs.puppet.com/puppet/latest/reference/man/apply.html#EXAMPLE)を適用するチェックしましたか? – 030