diff options
author | Bradley A. Thornton <bthornto@thethorntons.net> | 2019-08-09 10:42:04 -0700 |
---|---|---|
committer | Bradley A. Thornton <bthornto@thethorntons.net> | 2019-08-09 10:42:04 -0700 |
commit | 7b9a33a29007ed302c3001566061e22c514cde64 (patch) | |
tree | 7c4e4b0b740538d7e3953c377cba432d58805022 /plugins/modules/vyos_system.py | |
parent | 8a50be4b9309387624e92a154366b34fa512cd8b (diff) | |
download | vyos-ansible-collection-7b9a33a29007ed302c3001566061e22c514cde64.tar.gz vyos-ansible-collection-7b9a33a29007ed302c3001566061e22c514cde64.zip |
bt_yapfed
Diffstat (limited to 'plugins/modules/vyos_system.py')
-rw-r--r-- | plugins/modules/vyos_system.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/plugins/modules/vyos_system.py b/plugins/modules/vyos_system.py index 20cf907..449d142 100644 --- a/plugins/modules/vyos_system.py +++ b/plugins/modules/vyos_system.py @@ -17,10 +17,11 @@ # along with Ansible. If not, see <http://www.gnu.org/licenses/>. # -ANSIBLE_METADATA = {'metadata_version': '1.1', - 'status': ['preview'], - 'supported_by': 'network'} - +ANSIBLE_METADATA = { + 'metadata_version': '1.1', + 'status': ['preview'], + 'supported_by': 'network' +} DOCUMENTATION = """ --- @@ -99,7 +100,6 @@ from ansible_collections.vyos.vyos.plugins.module_utils.network. \ vyos.vyos import vyos_argument_spec - def spec_key_to_device_key(key): device_key = key.replace('_', '-') @@ -154,9 +154,11 @@ def spec_to_commands(want, have): commands.append("delete system %s" % device_key) for config in proposed: if state == 'absent' and config in current: - commands.append("delete system %s '%s'" % (device_key, config)) + commands.append("delete system %s '%s'" % + (device_key, config)) elif state == 'present' and config not in current: - commands.append("set system %s '%s'" % (device_key, config)) + commands.append("set system %s '%s'" % + (device_key, config)) else: if state == 'absent' and current and proposed: commands.append('delete system %s' % device_key) @@ -182,7 +184,9 @@ def main(): domain_name=dict(type='str'), domain_search=dict(type='list'), name_server=dict(type='list', aliases=['name_servers']), - state=dict(type='str', default='present', choices=['present', 'absent']), + state=dict(type='str', + default='present', + choices=['present', 'absent']), ) argument_spec.update(vyos_argument_spec) |