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

Fixes #24425 - Templates for modularity actions #498

Merged
merged 1 commit into from Aug 10, 2018

Conversation

@parthaa
Copy link
Contributor

commented Aug 7, 2018

This commit contains rex templates for modularity related actions.

@stbenjam
Copy link
Member

left a comment

I can't actually test yet, since I can't get any modules visible on my F28 box - but looks good, just a couple of comments

description: 'The module action: enable, disable, install, update, or remove, lock, unlock'
input_type: user
required: true
options: "\nlist\ninfo\nenable\ndisable\ninstall\nupdate\nremove\nprovides\nlock\nunlock\nprofile\nstreams"

This comment has been minimized.

Copy link
@stbenjam

stbenjam Aug 8, 2018

Member

The list of options doesn't match the description above

This comment has been minimized.

Copy link
@stbenjam

stbenjam Aug 8, 2018

Member

I would probably just leave description as "The module action, e.g. install, enable, etc" or something, instead of providing a long list.

description: 'The module action: enable, disable, install, update, or remove, lock, unlock'
input_type: user
required: true
options: "\nlist\ninfo\nenable\ndisable\ninstall\nupdate\nremove\nprovides\nlock\nunlock\nprofile\nstreams"

This comment has been minimized.

Copy link
@stbenjam

stbenjam Aug 8, 2018

Member

The list of options doesn't match the description above

@stbenjam

This comment has been minimized.

Copy link
Member

commented Aug 8, 2018

I managed to test on the f28 box in Forklift, and it works well

name: Module Action - SSH Default
model: JobTemplate
job_category: Modules
description_format: "%{action} %{module_spec}"

This comment has been minimized.

Copy link
@stbenjam

stbenjam Aug 8, 2018

Member

Can this be prefixed by "Module" like the Ansible one is?

kind: job_template
name: Module Action - Ansible Default
model: JobTemplate
job_category: Modules

This comment has been minimized.

Copy link
@stbenjam

stbenjam Aug 10, 2018

Member

Unfortunately the category name has to be "Ansible Modules" to keep conventions with everything else. Every category only has one job template :-\ There's a BZ open to change that. Notice the two Template selectors:

screenshot from 2018-08-10 13-00-24

@stbenjam

This comment has been minimized.

Copy link
Member

commented Aug 10, 2018

After changing the ansible category (see above), things work well, however because we are running dnf directly instead of using the dnf module (which doesn't support modularity), Ansible warns:

"Consider using the dnf module rather than running dnf. If you need to use command because dnf is insufficient you can add warn=False to this command task or set command_warnings=False in ansible.cfg to get rid of this message."

You can add this below register on the shell command:

args:
  warn: false
@stbenjam

This comment has been minimized.

Copy link
Member

commented Aug 10, 2018

Incidentally, once https://github.com/ansible/ansible/pull/38457/files is merged and in an ansible release, we should move to the native provider.

@theforeman theforeman deleted a comment from theforeman-bot Aug 10, 2018

@parthaa parthaa force-pushed the parthaa:24425 branch from 2e4751d to ba7c6e8 Aug 10, 2018

Fixes #24425 - Templates for modularity actions
This commit contains rex templates for modularity related actions.

@parthaa parthaa force-pushed the parthaa:24425 branch from ba7c6e8 to 9a17f6e Aug 10, 2018

@stbenjam
Copy link
Member

left a comment

LGTM!

@stbenjam stbenjam removed the Needs testing label Aug 10, 2018

@stbenjam stbenjam merged commit 3e58a3a into theforeman:develop Aug 10, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@parthaa parthaa deleted the parthaa:24425 branch Aug 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.