This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
search(:users, "*:*").each do |user_data| | |
user user_data["id"] do | |
comment user_data["comment"] | |
password user_data["password"] | |
end | |
end | |
include_recipe "users::groups" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2015-05-20T11:06:52-07:00] FATAL: Unrecognized setting enabled for audit mode. | |
* To enable audit mode after converge, use command line option `--audit-mode enabled` or set `:audit_mode = :enabled` in your config file. | |
* To disable audit mode, use command line option `--audit-mode disabled` or set `:audit_mode = :disabled` in your config file. | |
* To only run audit mode, use command line option `--audit-mode audit-only` or set `:audit_mode = :audit_only` in your config file. | |
Audit mode is disabled by default. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----> Starting Kitchen (v1.4.0.rc.1) | |
-----> Converging <default-win2012r2>... | |
Preparing files for transfer | |
Preparing dna.json | |
Resolving cookbook dependencies with Berkshelf 3.2.3... | |
Removing non-cookbook files before transfer | |
Preparing data_bags | |
Preparing validation.pem | |
Preparing client.rb | |
-----> Chef Omnibus installation detected (install only if missing) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[5] pry(main)> File.exists?('C:\Windows\System32\Tasks\CSC Patching') | |
=> false | |
[6] pry(main)> File.exists?('C:\Windows\System32\Tasks\"CSC Patching') | |
=> false | |
[7] pry(main)> File.exists?('C:\Windows\System32\Tasks\"CSC Patching"') | |
=> false | |
[8] pry(main)> File.exists?("C:\\Windows\\System32\\Tasks\\CSC\ Patching") | |
=> false | |
[9] pry(main)> File.exists?("C:\\Windows\\System32\\Tasks\\CSC\ Patching") | |
=> false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I, [2015-06-22T17:05:19.088678 #3132] INFO -- Kitchen: -----> Starting Kitchen (v1.4.0) | |
I, [2015-06-22T17:05:20.375608 #3132] INFO -- Kitchen: -----> Creating <default-win2012r2>... | |
E, [2015-06-22T17:06:11.469878 #3132] ERROR -- Kitchen: ------Exception------- | |
E, [2015-06-22T17:06:11.469878 #3132] ERROR -- Kitchen: Class: Kitchen::ActionFailed | |
E, [2015-06-22T17:06:11.469878 #3132] ERROR -- Kitchen: Message: Failed to complete #create action: | |
[You are not authorized to perform this operation.] | |
E, [2015-06-22T17:06:11.469878 #3132] ERROR -- Kitchen: ---Nested Exception--- | |
E, [2015-06-22T17:06:11.469878 #3132] ERROR -- Kitchen: Class: Aws::EC2::Errors::UnauthorizedOperat | |
ion | |
E, [2015-06-22T17:06:11.469878 #3132] ERROR -- Kitchen: Message: You are not authorized to perform |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( •_•) | |
( •_•)>⌐■-■ | |
(⌐■_■) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe 'motd::default' do | |
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) } | |
it 'creates an motd correctly' do | |
expect(chef_run).to create_template('/etc/motd').with( | |
:user => 'root', | |
:group => 'root', | |
:mode => '0644' | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LineLength: | |
Enabled: false | |
StringLiterals: | |
Enabled: false | |
HashSyntax: | |
Enabled: false | |
SpaceInsideParens: | |
Enabled: false | |
SpaceInsideBrackets: | |
Enabled: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
control_group 'SSH Security' do | |
control 'SSH' do | |
it 'should be listening on port 22' do | |
expect(port(22)).to be_listening | |
end | |
it 'disables root logins over ssh' do | |
expect(file('/etc/ssh/sshd_config')).to contain('PermitRootLogin no') | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
powershell_script "Install IIS" do | |
action :run | |
code "add-windowsfeature Web-Server" | |
end | |
service "w3svc" do | |
action [ :enable, :start ] | |
end | |
template 'c:\inetpub\wwwroot\Default.htm' do |