Skip to content

Commit

Permalink
fix: scope timeout arguments for salt client correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
blu-base committed Jul 14, 2024
1 parent 5f2d643 commit 5ad8507
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions contents/salt_resource_model_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ def collect_minions_grains(client, data, all_needed_grains):
}

if data['timeout'] is not None:
low_state['kwarg']['timeout'] = data['timeout']
low_state['timeout'] = data['timeout']
if data['gather-timeout'] is not None:
low_state['kwarg']['gather_job_timeout'] = data['gather-timeout']
low_state['gather_job_timeout'] = data['gather-timeout']

log.debug(f'Compiled low_state: {low_state}')

Expand Down Expand Up @@ -136,9 +136,9 @@ def collect_minions_pillar(client, data, all_needed_pillar):
}

if data['timeout'] is not None:
low_state['kwarg']['timeout'] = data['timeout']
low_state['timeout'] = data['timeout']
if data['gather-timeout'] is not None:
low_state['kwarg']['gather_job_timeout'] = data['gather-timeout']
low_state['gather_job_timeout'] = data['gather-timeout']

log.debug(f'Compiled low_state: {low_state}')

Expand Down Expand Up @@ -241,7 +241,7 @@ def generate_resource_model(minions_grains, minions_pillar, data):
pillar = minions_pillar.get(minion, {}).get('ret', {})

# extend existing tags
pillar_tags = process_tags(pillar, string_to_unique_set(data['tags']))
pillar_tags = process_tags(pillar, string_to_unique_set(data['pillar-tags']))
resource_model[nodename]['tags'] += pillar_tags

# append attributes
Expand Down
1 change: 0 additions & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ providers:
title: 'Node attributes from pillar'
description: 'Create node attributes from pillar and their values. use comma-separated list for multiple grains. Nested values of grains are not supported, but nested keys are, such as systemd.version.'
scope: Project
default: 'master'
- type: Integer
name: timeout
title: 'Minion timeout'
Expand Down

0 comments on commit 5ad8507

Please sign in to comment.