Skip to content

Instantly share code, notes, and snippets.

@ScriptAutomate
Created August 16, 2024 05:38
Show Gist options
  • Save ScriptAutomate/500427b694df5b1f5a38d525a0891959 to your computer and use it in GitHub Desktop.
Save ScriptAutomate/500427b694df5b1f5a38d525a0891959 to your computer and use it in GitHub Desktop.
Install AWS CLI via Salt State
{% set user_name = salt['pillar.get']('common:lookup:user') %}
awscli-extract:
archive.extracted:
- name: /home/{{ user_name }}/Downloads/awscli
- if_missing: /home/{{ user_name }}/Downloads/awscli/aws
- archive_format: zip
- source: https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip
- user: {{ user_name }}
- group: {{ user_name }}
- skip_verify: True
awscli-install:
cmd.run:
- name: /home/{{ user_name }}/Downloads/awscli/aws/install
- creates: /usr/local/bin/aws
awscli-update:
cmd.run:
- name: /home/{{ user_name }}/Downloads/awscli/aws/install --update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment