Commit 4712f5b0 by e0d

adding dest param

parent 130d93b4
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
# - { # - {
# role: automated, # role: automated,
# automated_rbash_links: $as_automated_rbash_links, # automated_rbash_links: $as_automated_rbash_links,
# automated_sudoers_dest: '99-my_role'
# automated_sudoers_file: 'roles/my_role/files/etc/sudoers.d/99-my_role' # automated_sudoers_file: 'roles/my_role/files/etc/sudoers.d/99-my_role'
# } # }
# #
...@@ -36,6 +37,7 @@ ...@@ -36,6 +37,7 @@
# - { # - {
# role: automated, # role: automated,
# automated_rbash_links: $as_automated_rbash_links, # automated_rbash_links: $as_automated_rbash_links,
# automated_sudoers_dest: '99-my_role'
# automated_sudoers_template: 'roles/my_role/templates/etc/sudoers.d/99-my_role.j2' # automated_sudoers_template: 'roles/my_role/templates/etc/sudoers.d/99-my_role.j2'
# } # }
# #
...@@ -52,6 +54,9 @@ ...@@ -52,6 +54,9 @@
- fail: automated_rbash_links required for role - fail: automated_rbash_links required for role
when: automated_rbash_links is not defined when: automated_rbash_links is not defined
- fail: automated_sudoers_dest required for role
when: automated_sudoers_dest is not defined
- name: automated | create automated user - name: automated | create automated user
user: user:
name={{ automated_user }} state=present shell=/bin/rbash name={{ automated_user }} state=present shell=/bin/rbash
...@@ -77,7 +82,7 @@ ...@@ -77,7 +82,7 @@
dest=/etc/sudoers.d/{{ automated_sudoers_file.split('/').pop() }} dest=/etc/sudoers.d/{{ automated_sudoers_file.split('/').pop() }}
src={{ automated_sudoers_template }} owner="root" src={{ automated_sudoers_template }} owner="root"
group="root" mode=0440 validate='visudo -cf %s' group="root" mode=0440 validate='visudo -cf %s'
when: automated_sudoers_tempate is defined when: automated_sudoers_template is defined
tags: tags:
- automated - automated
- install - install
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment