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

Use role dependencies instead of explicit include_roles #40

Merged
merged 10 commits into from
Sep 16, 2024
3 changes: 2 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ galaxy_info:
- desktop
- integrationtesting

dependencies: []
dependencies:
- role: ccdc.package_manager_configuration
4 changes: 0 additions & 4 deletions tasks/AlmaLinux.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
- name: Set up package managers for required tools
ansible.builtin.include_role:
name: ccdc.package_manager_configuration

- name: Install desktop environment
ansible.builtin.package:
name: "{{ package }}"
Expand Down
6 changes: 0 additions & 6 deletions tasks/Darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@
homebrew_installed_packages:
- xfreebird/utils/kcpassword

# - name: Add kcpassword utility for autologin
# community.general.homebrew:
# name: kcpassword
# state: present
# become: true

- name: Set autoLoginUser for current user
community.general.osx_defaults:
domain: /Library/Preferences/com.apple.loginwindow
Expand Down
4 changes: 0 additions & 4 deletions tasks/RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
- name: Set up package managers for required tools
ansible.builtin.include_role:
name: ccdc.package_manager_configuration

- name: Install desktop environment
ansible.builtin.package:
name: "{{ package }}"
Expand Down
12 changes: 10 additions & 2 deletions tasks/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@
become: true

- name: Enable autologon for vagrant
ansible.windows.win_command: powershell.exe Start-Process -FilePath "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe" -ArgumentList '"/accepteula" vagrant . {{ windows_autologon_password }}'
ansible.windows.win_command: >
powershell.exe Start-Process
-FilePath "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe"
-ArgumentList '"/accepteula" vagrant . {{ windows_autologon_password }}'
- name: Disable screen saver
ansible.windows.win_shell: Set-ItemProperty "HKCU:\Control Panel\Desktop" -Name ScreenSaveActive -Value 0 -Type DWord
ansible.windows.win_shell: >
Set-ItemProperty
"HKCU:\Control Panel\Desktop"
-Name ScreenSaveActive
-Value 0
-Type DWord
- name: Disable monitor and standby idle timeout
ansible.windows.win_command: powercfg -x -{{ timeout }} 0
Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Set OS-specific variables for {{ ansible_os_family }}-{{ ansible_distribution }}-{{ ansible_distribution_major_version }}
- name: Set OS-specific variables for {{ ansible_os_family }}-{{ ansible_distribution }}-{{ ansible_distribution_major_version }} # noqa: name[template]
ansible.builtin.include_vars: "{{ item }}"
with_first_found:
- files:
Expand All @@ -11,7 +11,7 @@
skip: true
tags: vars

- name: Set up desktop environment on {{ ansible_os_family }}-{{ ansible_distribution }}-{{ ansible_distribution_major_version }}
- name: Set up desktop environment on {{ ansible_os_family }}-{{ ansible_distribution }}-{{ ansible_distribution_major_version }} # noqa: name[template]
ansible.builtin.include_tasks: "{{ item }}"
with_first_found:
- files:
Expand Down
2 changes: 1 addition & 1 deletion vars/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ homebrew_user: "{{ ansible_user }}"
homebrew_taps:
- name: xfreebird/utils
- name: xcodesorg/made
current_user: "{{ lookup('env','USER') }}"
current_user: "{{ lookup('env', 'USER') }}"

homebrew_installed_packages:
- kcpassword
Expand Down
Loading