zypper: Add environment example #20130

Merged
merged 1 commit into from Jan 11, 2017

Projects

None yet

4 participants

@robinro
Contributor
robinro commented Jan 11, 2017 edited
ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

zypper.py

ANSIBLE VERSION

devel

SUMMARY

Add example for usage of ZYPP_LOCK_TIMEOUT

Retries to require lock for zypper operation.

+ env:
+ version_added: "2.3"
+ description:
+ - Dict of env variables to pass to zypper. For example ZYPP_LOCK_TIMEOUT to wait for some time when tryping to acquire
@gundalow
gundalow Jan 11, 2017 Contributor

I think this needs to be on one line

2017-01-11 13:30:15 Run command: test/sanity/validate-modules/validate-modules lib/ansible/modules/packaging/os/zypper.py --exclude '^(lib/ansible/modules/utilities/logic/async_status.py|lib/ansible/modules/utilities/helper/_accelerate.py)'
2017-01-11 13:30:15 ============================================================================
2017-01-11 13:30:15 lib/ansible/modules/packaging/os/zypper.py
2017-01-11 13:30:15 ============================================================================
2017-01-11 13:30:15 TRACE:
2017-01-11 13:30:15     while scanning a simple key
2017-01-11 13:30:15       in "<string>", line 79, column 13:
2017-01-11 13:30:15                     a lock.
2017-01-11 13:30:15                     ^
2017-01-11 13:30:15     could not find expected ':'
2017-01-11 13:30:15       in "zypper.DOCUMENTATION", line 115, column 9:
2017-01-11 13:30:15                 required: false
2017-01-11 13:30:15                 ^
2017-01-11 13:30:15 ERROR: DOCUMENTATION is not valid YAML. Line 115 column 9
@robinro
robinro Jan 11, 2017 Contributor

Thanks, fixed it.

@sivel
Member
sivel commented Jan 11, 2017

I'm wondering why we wouldn't just recommend using the environment directive on the task instead of duplicating environment functionality into module args?

@robinro robinro Add example for usage of ZYPP_LOCK_TIMEOUT
Retries to require lock for zypper operation.
c6995aa
@robinro
Contributor
robinro commented Jan 11, 2017 edited

@sivel you're correct of course. I was thinking of too much other stuff to realize this. So this is downgraded to a docs pull request with an example of using the environment directive.

@gundalow gundalow changed the title from Add option 'env' to zypper module to zypper: Add environment option Jan 11, 2017
@gundalow gundalow changed the title from zypper: Add environment option to zypper: Add environment example Jan 11, 2017
@gundalow gundalow merged commit e4bfc2b into ansible:devel Jan 11, 2017

1 check passed

Shippable Run 9247 status is SUCCESS.
Details
@BondAnthony BondAnthony added a commit to BondAnthony/ansible that referenced this pull request Jan 20, 2017
@robinro @BondAnthony robinro + BondAnthony Add ZYPP_LOCK_TIMEOUT environment example (#20130)
Retries to require lock for zypper operation.
be64b94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment