0
내용은 default.rb 요리 책의 요리법입니다.주방 테스트가 실패했습니다. Sudo는 암호가 필요합니다. 기본 설정 : centos-67
include_recipe 'sudo'
include_recipe 'chef-vault'
group "#{node['cookbook']['group']}" do
action :create
append true
system false
end
user 'user' do
supports :manage_home => false
home nil
system false
password "HASH_PASSWORD"
gid "#{node['cookbook']['group']}"
shell '/bin/bash'
action :create
end
이 내용은 kitchen.yml의 내용이기도합니다.
driver:
name: docker
use_sudo: false
provisioner:
name: chef_zero
verifier:
name: inspec
platforms:
- name: centos-6.7
suites:
- name: default
data_bags_path: "test/integration/default/data_bags"
encrypted_data_bag_secret_key_path: "test/integration/default/encrypted_data_bag_secret"
run_list:
- recipe[rise-users::default]
attributes:
내가 만든 주방 테스트입니다.
control "mycookbook-1.0" do
impact 1.0
title "myCookbook users packages and configuration files"
desc "packages and configuration files that should exist on all servers"
describe user('user') do
it { should exist }
end
end
은 내가
부엌 테스트 명령을 실행하고이 eror을 얻었다. 난 그냥 sudo는 이후를 구성 할
kitchen.yml 업데이트
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Failed to complete #verify action: [Sudo failed: Sudo requires a password, please configure it.] on default-centos-67
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
은 암호가 필요하지만 불행히도 그것은 작동하지 않습니다.
attributes
을 kitchen.yml
으로 업데이트하여 해결했습니다.
attributes:
authorization:
sudo:
users: ['kitchen']
passwordless: true
include_sudoers_d: true
안녕하세요 @ codander, sudo 명령의 sudoers 설정을 덮어 쓰지 않았지만 요리 책에 넣을 때 문제가 있습니다. 대답 해줘서 고마워. – micmicsuarez
예,'sudo' 쿡북의 기본 구성으로 문제가 해결됩니다. – coderanger
안녕하세요 @ 코더 너 저는 동의합니다. 필자는'kitchen login'을 사용하여 가상 머신에 로그인하여 임시 해결책을 만들고 부엌 사용자를 추가하기 위해'sudoers' 파일을 편집합니다. 어떻게 해결할 수 있습니까? 감사. – micmicsuarez