-
Notifications
You must be signed in to change notification settings - Fork 36
Manage options #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kenyon
wants to merge
8
commits into
theforeman:master
Choose a base branch
from
kenyon:manage-options
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+123
−4
Open
Manage options #160
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
005273e
More flexibility in configuration
ekohl 6d681d7
fixtures: update puppet-systemd URL to voxpupuli
kenyon ce3e834
convert Debian options file template to EPP
kenyon bda5df5
RedHat: add default tftp::options
kenyon 9c74eeb
config: add unit tests for tftp::options
kenyon 3e8f1fc
init: don't allow empty strings for $username
kenyon 15dd786
init: don't allow empty strings for $options
kenyon d6d3313
tftpd-hpa.epp: add comment about Puppet management
kenyon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| require 'spec_helper_acceptance' | ||
|
|
||
| describe 'tftp with default parameters' do | ||
| it_behaves_like 'an idempotent resource' do | ||
| let(:manifest) do | ||
| <<-EOS | ||
| class { 'tftp': | ||
| port => 1234, | ||
| } | ||
|
|
||
| file { "${tftp::root}/test": | ||
| ensure => file, | ||
| content => 'running on a different port', | ||
| } | ||
| EOS | ||
| end | ||
| end | ||
|
|
||
| service_name = case fact('osfamily') | ||
| when 'Archlinux' | ||
| 'tftpd.socket' | ||
| when 'RedHat' | ||
| 'tftp.socket' | ||
| when 'Debian' | ||
| 'tftpd-hpa' | ||
| end | ||
|
|
||
| describe service(service_name) do | ||
| it { is_expected.to be_enabled } | ||
| it { is_expected.to be_running } | ||
| end | ||
|
|
||
| describe port(69), unless: service_name.end_with?('.socket') do | ||
| it { is_expected.not_to be_listening } | ||
| end | ||
|
|
||
| describe port(1234), unless: service_name.end_with?('.socket') do | ||
| it { is_expected.to be_listening.with('udp') } | ||
| end | ||
|
|
||
| describe 'ensure tftp client is installed' do | ||
| on hosts, puppet('resource', 'package', 'tftp', 'ensure=installed') | ||
| end | ||
|
|
||
| describe command("echo get /test /tmp/downloaded_file | tftp #{fact('fqdn')} 1234") do | ||
| its(:exit_status) { should eq 0 } | ||
| end | ||
|
|
||
| describe file('/tmp/downloaded_file') do | ||
| it { should be_file } | ||
| its(:content) { should eq 'running on a different port' } | ||
| end | ||
| 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [Service] | ||
| ExecStart= | ||
| ExecStart=/usr/sbin/in.tftp <%= $tftp::options %> <%= $tftp::root %> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # /etc/default/tftpd-hpa | ||
| # This file is managed by Puppet. | ||
|
|
||
| TFTP_USERNAME="<%= $tftp::username %>" | ||
| TFTP_DIRECTORY="<%= $tftp::root %>" | ||
| TFTP_ADDRESS="<%= $tftp::address %>:<%= $tftp::port %>" | ||
| TFTP_OPTIONS="<%= $tftp::options %>" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.