diff --git a/library/luks_decrypt.py b/library/luks_decrypt.py index fbdd876..6942445 100644 --- a/library/luks_decrypt.py +++ b/library/luks_decrypt.py @@ -35,7 +35,7 @@ def main(): fields = { 'name': { 'type': 'str', 'required': True }, 'device': { 'type': 'str', 'required': True }, - 'key': { 'type': 'str', 'required': True } + 'key': { 'type': 'str', 'required': True, 'no_log': True } } module = AnsibleModule(argument_spec=fields) changed = False diff --git a/library/luks_manage.py b/library/luks_manage.py index 785799c..d44b661 100644 --- a/library/luks_manage.py +++ b/library/luks_manage.py @@ -32,7 +32,7 @@ def main(): 'device': { 'type': 'str', 'required': True }, 'cipher': { 'type': 'str', 'default': 'aes-xts-plain' }, 'size': { 'type': 'int', 'default': 256 }, - 'key': { 'type': 'str', 'required': True } + 'key': { 'type': 'str', 'required': True, 'no_log': True } } module = AnsibleModule(argument_spec=fields) changed = False diff --git a/tasks/main.yml b/tasks/main.yml index 6d96682..eb27f24 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -17,7 +17,8 @@ size: '{{ item.size|default(256) }}' key: '{{ item.key }}' loop: '{{ luks_devices }}' - no_log: true + loop_control: + label: '{{ item.name }} - {{ item.device }}' tags: luks - name: decrypt luks device @@ -26,7 +27,8 @@ name: '{{ item.name }}' key: '{{ item.key }}' loop: '{{ luks_devices }}' - no_log: true + loop_control: + label: '{{ item.name }} - {{ item.device }}' tags: luks - name: format partition @@ -34,7 +36,8 @@ fstype: '{{ item.fstype }}' dev: '/dev/mapper/{{ item.name }}' loop: '{{ luks_devices }}' - no_log: true + loop_control: + label: '{{ item.name }} - {{ item.device }}' tags: luks - name: mount partition @@ -45,5 +48,6 @@ opts: noauto state: mounted loop: '{{ luks_devices }}' - no_log: true + loop_control: + label: '{{ item.name }} - {{ item.device }}' tags: luks