pub struct ModuleSpec {
pub name: &'static str,
pub free_form: bool,
pub summary: &'static str,
pub args: &'static [ModuleArg],
pub validated_as: Option<&'static str>,
}Expand description
One native module: its Ansible name and how the controller parses its arguments.
Fields§
§name: &'static strShort name, without the ansible.builtin. prefix.
free_form: boolThe task’s string form is a command line kept whole as _raw_params,
instead of key=value pairs.
summary: &'static strOne line for the generated documentation.
args: &'static [ModuleArg]Every argument the reference accepts for this module, sorted, with what this release does with each. Empty for a module whose arguments nothing here checks yet.
validated_as: Option<&'static str>The name the reference validates this module’s arguments under, when it validates them at all, and so the name its refusal carries.
Measured on ansible-core 2.19.12: shell is executed by the command module, so an
argument neither module has is refused as ansible.legacy.command under both names and
against one list. raw never reaches a module at all - its action plugin hands the line
to the shell - so it takes any argument without looking at it, and a run that refused one
would refuse a playbook the reference runs.
Trait Implementations§
Source§impl Clone for ModuleSpec
impl Clone for ModuleSpec
Source§fn clone(&self) -> ModuleSpec
fn clone(&self) -> ModuleSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ModuleSpec
Source§impl Debug for ModuleSpec
impl Debug for ModuleSpec
impl Eq for ModuleSpec
Source§impl PartialEq for ModuleSpec
impl PartialEq for ModuleSpec
impl StructuralPartialEq for ModuleSpec
Auto Trait Implementations§
impl Freeze for ModuleSpec
impl RefUnwindSafe for ModuleSpec
impl Send for ModuleSpec
impl Sync for ModuleSpec
impl Unpin for ModuleSpec
impl UnsafeUnpin for ModuleSpec
impl UnwindSafe for ModuleSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.