Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcusramberg/ansiblemodule
https://github.com/marcusramberg/ansiblemodule
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/marcusramberg/ansiblemodule
- Owner: marcusramberg
- Created: 2015-07-02T22:53:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-05-08T08:06:41.000Z (over 5 years ago)
- Last Synced: 2024-12-21T11:51:23.799Z (26 days ago)
- Language: Perl
- Size: 24.4 KB
- Stars: 0
- Watchers: 4
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.txt
- Changelog: Changes
Awesome Lists containing this project
README
NAME
AnsibleModule - Port of AnsibleModule helper from Ansible distributionSYNOPSIS
my $pkg_mod=AnsibleModule->new(argument_spec=>
name => { aliases => 'pkg' },
state => {
default => 'present',
choices => [ 'present', 'absent'],
list => {}
},
required_one_of => [ qw/ name list / ],
mutually_exclusive => [ qw/ name list / ],
supports_check_mode => 1,
);
... $pkg_mod->exit_json(changed => 1, foo => 'bar');DESCRIPTION
This is a helper class for building ansible modules in Perl. It's a
straight port of the AnsibleModule class that ships with the Ansible
distribution. It also includes ansible-perl, a helper script to test
and package your modules with FatPacker.ATTRIBUTES
argument_spec
The argument specification for your module.bypass_checks
no_log
check_invalid_arguments
mutually_exclusive
required_together
required_one_fo
add_file_common_args
supports_check_mode
required_ifMETHODS
exit_json $args
Exit with a json msg. changed will default to false.fail_json $args
Exit with a failure. msg is required.