diff options
-rw-r--r-- | lib/postmulti | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/postmulti b/lib/postmulti index cad01f8..d6ecb09 100644 --- a/lib/postmulti +++ b/lib/postmulti @@ -16,40 +16,44 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # Look up postfix configuration variable def postconf(k, instance=None): if instance: cmd = [ os.path.join(os.sep, 'usr', 'sbin', 'postmulti') , '-x' , '-i', instance , '--' ] else: cmd = [] cmd.extend([ os.path.join(os.sep, 'usr', 'sbin', 'postconf') , '-h', k ]) return subprocess.check_output(cmd, stderr=subprocess.STDOUT).rstrip() +# To destroy an existing instance: +# postmulti -e disable -i mx +# postmulti -e destroy -i mx + def main(): module = AnsibleModule( argument_spec = dict( instance = dict( required=True ), group = dict( required=False ) ), supports_check_mode=True ) params = module.params instance = params['instance'] group = params['group'] changed=False try: enable = postconf('multi_instance_enable') wrapper = postconf('multi_instance_wrapper') if enable != "yes" or not wrapper: # Initiate postmulti |