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

Fixed linux powershell installation and execution #2

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

l50
Copy link

@l50 l50 commented Apr 6, 2024

The role was not working for me in several linux distros, so I went ahead and fixed the issues I encountered.
I've also got working molecule tests, which I'm happy to provide in a separate PR.

Added:

  • Added variables for PowerShell version and installation path.
  • Included common, Debian-specific, and RedHat-specific package lists for installation.
  • Multi architecture support

Changed:

  • Refactored PowerShell installation to use a generic approach with architecture mapping.
  • Updated invoke-atomictest.yml to use the pwsh command without absolute paths.
  • Simplified setup-linux.yml to streamline PowerShell setup and remove old installation methods.
  • Applied linters to existing markdown and yaml.

Removed:

  • Removed old PowerShell installation tasks specific to Ubuntu, Amazon Linux, and CentOS.

l50 added 5 commits April 6, 2024 02:39
… paths for Atomic Red Team

**Added:**
- Added variables for PowerShell version and installation path.
- Included common, Debian-specific, and RedHat-specific package lists for installation.

**Changed:**
- Refactored PowerShell installation to use a generic approach with architecture mapping.
- Updated `invoke-atomictest.yml` to use the `pwsh` command without absolute paths.
- Simplified `setup-linux.yml` to streamline PowerShell setup and remove old installation methods.

**Removed:**
- Removed old PowerShell installation tasks specific to Ubuntu, Amazon Linux, and CentOS.
**Changed:**
- Standardized variable names with `ansible_atomic_red_team_` prefix for consistency.
- Updated `example-playbook.yml` to use the new standardized variable names.
- Moved `update-art-tids.sh` script from `vars` to `files` directory and set executable permissions.
- Enhanced `gather-art-tids.yml` task to create a temporary directory, copy the emergency bash script, and gather ART TIDs into a YAML file in the temporary directory.
- Modified `invoke-atomictest.yml` to set a fact for `prereq_check_passed` and conditional execution of test and cleanup tasks based on this fact.
- Updated `setup-linux.yml` to include installation of Invoke-ART, setting up the PowerShell profile, and added additional packages for setup.
- Removed `update-art-tids.sh` script from `vars` directory as it has been moved to `files`.
- Added a timeout variable `ansible_atomic_red_team_timeout` for ART tests in `defaults/main.yml`.

**Removed:**
- Removed unused variables `atomic_red_team_common_install_packages`, `atomic_red_team_debian_specific_packages`, and `atomic_red_team_redhat_specific_packages` from `vars/main.yml`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant