def test_removed_module_sys_exit(input_data): """Test for removed_module function, sys.exit().""" with pytest.raises(SystemExit) as wrapped_e: removed_module(input_data) assert wrapped_e.type == SystemExit assert wrapped_e.value.code == 1
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['removed'], 'supported_by': 'community' } from ansible.module_utils.common.removed import removed_module if __name__ == '__main__': removed_module(removed_in='2.8')
nics_service = vms_service.service(vm.id).nics_service() if module.params['name']: nics = [ e for e in nics_service.list() if fnmatch.fnmatch(e.name, module.params['name']) ] else: nics = nics_service.list() result = dict(ovirt_nics=[ get_dict_of_struct( struct=c, connection=connection, fetch_nested=module.params.get('fetch_nested'), attributes=module.params.get('nested_attributes'), ) for c in nics ], ) if is_old_facts: module.exit_json(changed=False, ansible_facts=result) else: module.exit_json(changed=False, **result) except Exception as e: module.fail_json(msg=str(e), exception=traceback.format_exc()) finally: connection.close(logout=auth.get('token') is None) if __name__ == '__main__': removed_module("2.10")
resource_tags: { "Environment":"Dev", "Tier" : "DB" } internet_gateway: True route_tables: - subnets: - 172.22.2.0/24 - 172.22.3.0/24 routes: - dest: 0.0.0.0/0 gw: igw - subnets: - 172.22.1.0/24 routes: - dest: 0.0.0.0/0 gw: igw region: us-west-2 register: vpc # Removal of a VPC by id - ec2_vpc: state: absent vpc_id: vpc-aaaaaaa region: us-west-2 # If you have added elements not managed by this module, e.g. instances, NATs, etc then # the delete will fail until those dependencies are removed. ''' from ansible.module_utils.common.removed import removed_module if __name__ == '__main__': removed_module()
bond0: alias_name: uplink to isp slaves: - swp1 - swp3 ipv4: 10.1.1.1/24' bond2: vids: - 1 - 50 clag_id: 1 ''' RETURN = ''' changed: description: whether the interface was changed returned: changed type: bool sample: True msg: description: human-readable report of success or failure returned: always type: string sample: "interface bond0 config updated" ''' from ansible.module_utils.common.removed import removed_module if __name__ == '__main__': removed_module()
#!/usr/bin/python # # (c) 2013, Nimbis Services # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['removed'], 'supported_by': 'community' } from ansible.module_utils.common.removed import removed_module if __name__ == '__main__': removed_module(removed_in='2.2')
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['removed'], 'supported_by': 'community' } from ansible.module_utils.common.removed import removed_module if __name__ == '__main__': removed_module(removed_in="2.5")
#!/usr/bin/python from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['removed'], 'supported_by': 'core' } from ansible.module_utils.common.removed import removed_module if __name__ == '__main__': removed_module(removed_in='2.9')
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, James Cammarata <*****@*****.**> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['removed'], 'supported_by': 'community'} from ansible.module_utils.common.removed import removed_module if __name__ == '__main__': removed_module(removed_in="2.4")
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['removed'], 'supported_by': 'community' } from ansible.module_utils.common.removed import removed_module if __name__ == '__main__': removed_module(removed_in='2.7')
# # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. # from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['removed'], 'supported_by': 'community'} from ansible.module_utils.common.removed import removed_module if __name__ == '__main__': removed_module(removed_in="2.10")
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["removed"], "supported_by": "network", } from ansible.module_utils.common.removed import removed_module if __name__ == "__main__": removed_module(removed_in="2.9")