Skip to content
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

Renames salt worker content_source to salt_content #242

Merged
merged 1 commit into from
Apr 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Parameters supported by the Salt Worker:

- `salt_debug_log` (_string_): Path to the debug logfile that salt will write
to.
- `content_source` (_string_): URL to the Salt content file that contains
- `salt_content` (_string_): URL to the Salt content file that contains
further configuration specific to the salt install.
- `install_method` (_string_): (Linux-only) The method used to install Salt.
Currently supports: `yum`, `git`
Expand Down Expand Up @@ -128,10 +128,10 @@ all:
- salt:
admin_groups: None
admin_users: None
content_source: https://s3.amazonaws.com/watchmaker/salt-content.zip
computer_name: None
environment: False
ou_path: None
salt_content: https://s3.amazonaws.com/watchmaker/salt-content.zip
salt_states: Highstate
s3_source: False
user_formulas:
Expand Down
2 changes: 1 addition & 1 deletion src/watchmaker/static/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ all:
- salt:
admin_groups: None
admin_users: None
content_source: https://s3.amazonaws.com/watchmaker/salt-content.zip
computer_name: None
environment: False
ou_path: None
salt_content: https://s3.amazonaws.com/watchmaker/salt-content.zip
salt_states: Highstate
s3_source: False
user_formulas:
Expand Down
10 changes: 5 additions & 5 deletions src/watchmaker/workers/salt.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SaltBase(ManagerBase):
and user formulas from an S3 bucket. If ``True``, you must also
install ``boto3`` and ``botocore``. Those dependencies will not be
installed by Watchmaker.
content_source (:obj:`str`):
salt_content (:obj:`str`):
(Defaults to ``''``) URL to a salt content archive (zip file) that
will be uncompressed in the salt "srv" directory. This typically is
used to create a top.sls file and to populate salt's file_roots.
Expand Down Expand Up @@ -80,7 +80,7 @@ def __init__(self, *args, **kwargs): # noqa: D102
self.ent_env = kwargs.pop('environment', None) or ''
self.s3_source = kwargs.pop('s3_source', None) or False
self.salt_debug_log = kwargs.pop('salt_debug_log', None) or ''
self.content_source = kwargs.pop('content_source', None) or ''
self.salt_content = kwargs.pop('salt_content', None) or ''
self.ou_path = kwargs.pop('ou_path', None) or ''
self.admin_groups = kwargs.pop('admin_groups', None) or ''
self.admin_users = kwargs.pop('admin_users', None) or ''
Expand Down Expand Up @@ -194,14 +194,14 @@ def _get_formulas_conf(self):
]

def _build_salt_formula(self, extract_dir):
if self.content_source:
salt_content_filename = self.content_source.split('/')[-1]
if self.salt_content:
salt_content_filename = self.salt_content.split('/')[-1]
salt_content_file = os.sep.join((
self.working_dir,
salt_content_filename
))
self.download_file(
self.content_source,
self.salt_content,
salt_content_file,
self.s3_source
)
Expand Down