diff --git a/tasks/main.yml b/tasks/main.yml index 4c2c8c9..961823a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,8 +2,13 @@ - name: User under with the service will run block: - name: Create the user that will run the springboot app {{ item.name }} - user: name={{ item.user }} home={{ item.install_dir }} createhome=no shell={{ item.user_shell | default(springboot_user_shell) }} system={{ item.system_user | default(springboot_system_user) }} - with_items: '{{ springboot_apps }}' + user: + name: '{{ item.user }}' + home: '{{ item.install_dir }}' + createhome: false + shell: '{{ item.user_shell | default(springboot_user_shell) }}' + system: '{{ item.system_user | default(springboot_system_user) }}' + looop: '{{ springboot_apps }}' when: item.user is defined - name: Create the install directory of the springboot app {{ item.name }}