diff --git a/playbook.yml b/playbook.yml index 3d6ecaf..b7223f2 100644 --- a/playbook.yml +++ b/playbook.yml @@ -5,6 +5,7 @@ roles: - common - hashicorp + # - homebrew # - docker - python diff --git a/roles/hashicorp/tasks/config.yml b/roles/hashicorp/tasks/config.yml index e69de29..e3b9220 100644 --- a/roles/hashicorp/tasks/config.yml +++ b/roles/hashicorp/tasks/config.yml @@ -0,0 +1,5 @@ +- name: Install terragrunt + get_url: + url: https://github.com/gruntwork-io/terragrunt/releases/download/v0.36.6/terragrunt_linux_amd64 + dest: /usr/local/bin/terragrunt + mode: 755 diff --git a/roles/homebrew/defaults/main.yml b/roles/homebrew/defaults/main.yml new file mode 100644 index 0000000..e69de29 diff --git a/roles/homebrew/handlers/main.yml b/roles/homebrew/handlers/main.yml new file mode 100644 index 0000000..abfde9c --- /dev/null +++ b/roles/homebrew/handlers/main.yml @@ -0,0 +1 @@ +- include: services.yml diff --git a/roles/homebrew/handlers/services.yml b/roles/homebrew/handlers/services.yml new file mode 100644 index 0000000..e69de29 diff --git a/roles/homebrew/meta/main.yml b/roles/homebrew/meta/main.yml new file mode 100644 index 0000000..e69de29 diff --git a/roles/homebrew/tasks/dependencies.yml b/roles/homebrew/tasks/dependencies.yml new file mode 100644 index 0000000..b20d523 --- /dev/null +++ b/roles/homebrew/tasks/dependencies.yml @@ -0,0 +1,17 @@ +- name: Install common packages + apt: + update_cache: yes + name: "{{item}}" + state: present + become_user: root + with_items: + - curl + - wget + - ruby + - build-essential + - procps + - file + - git + + register: dependencies + \ No newline at end of file diff --git a/roles/homebrew/tasks/install.yml b/roles/homebrew/tasks/install.yml new file mode 100644 index 0000000..61908a0 --- /dev/null +++ b/roles/homebrew/tasks/install.yml @@ -0,0 +1,22 @@ +- name: Git Brew + become_user: diegotony + become: no + ansible.builtin.git: + repo: https://github.com/Homebrew/brew + dest: /home/diegotony/homebrew + +- name: "Add Brew in PATH" + become_user: diegotony + become: no + lineinfile: + path: /home/diegotony/.zshrc + line: "export PATH=/home/diegotony/homebrew/bin:$PATH" + state: present + + +- name: Add Homebrew to Path + become: no + ansible.builtin.shell: | + source /home/diegotony/.zshrc + args: + executable: /bin/bash diff --git a/roles/homebrew/tasks/main.yml b/roles/homebrew/tasks/main.yml new file mode 100644 index 0000000..73e84b7 --- /dev/null +++ b/roles/homebrew/tasks/main.yml @@ -0,0 +1,3 @@ +- include: dependencies.yml +- include: install.yml +- include: packages.yml \ No newline at end of file diff --git a/roles/homebrew/tasks/packages.yml b/roles/homebrew/tasks/packages.yml new file mode 100644 index 0000000..e69de29 diff --git a/roles/homebrew/templates/main.yml b/roles/homebrew/templates/main.yml new file mode 100644 index 0000000..e69de29 diff --git a/roles/homebrew/vars/main.yml b/roles/homebrew/vars/main.yml new file mode 100644 index 0000000..e69de29