Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add contionals to each task #11

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ sudoers_sudoers:
privileges: "{{ sudoers_sudoers_preset_privileges }}"

sudoers_sudoers_d_files: {}

sudoers_include_variables: true
sudoers_install: true
sudoers_configuration_sudoers_d: true
sudoers_configuration_sudoers: true
4 changes: 4 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- "_{{ ansible_distribution_release }}.yml"
- "_{{ ansible_distribution | lower }}.yml"
- _default.yml
when: sudoers_include_variables | bool
tags:
- configuration
- sudoers
Expand All @@ -17,6 +18,7 @@
state: "{{ apt_install_state | default('latest') }}"
update_cache: true
cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}"
when: sudoers_install | bool
tags:
- configuration
- sudoers
Expand Down Expand Up @@ -45,6 +47,7 @@
group: root
mode: 0440
with_dict: "{{ sudoers_sudoers_d_files }}"
when: sudoers_configuration_sudoers_d | bool
tags:
- configuration
- sudoers
Expand All @@ -59,6 +62,7 @@
owner: root
group: root
mode: 0440
when: sudoers_configuration_sudoers | bool
tags:
- configuration
- sudoers
Expand Down