diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2014-06-29 16:06:53 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-06-07 02:52:07 +0200 |
commit | 658321213c4aca5f31a1695b5ac34976e130604c (patch) | |
tree | eb3a6a70b818f13ef9c51d4cceb285e2b966bfd2 | |
parent | 898b2aa04d25ef237ffc5e26da8a206022bdc3fa (diff) |
Explain how to destroy existing Postfix instances.
-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 |