From aaea0a01fcfc901d9a45ba4590f17cd9b47854f4 Mon Sep 17 00:00:00 2001 From: naisanzaa Date: Mon, 27 Nov 2023 21:09:01 -0800 Subject: [PATCH] add tor --- playbooks/roles/tor/defaults/main.yaml | 2 ++ playbooks/roles/tor/meta/main.yaml | 4 ++++ playbooks/roles/tor/tasks/Apple M1.yml | 1 + playbooks/roles/tor/tasks/Darwin.yml | 7 +++++++ playbooks/roles/tor/tasks/Debian.yml | 3 +++ playbooks/roles/tor/tasks/MacOSX.yml | 3 +++ playbooks/roles/tor/tasks/RedHat.yml | 3 +++ playbooks/roles/tor/tasks/main.yaml | 3 +++ playbooks/roles/tor/vars/main.yaml | 9 +++++++++ playbooks/tor.yml | 4 ++++ 10 files changed, 39 insertions(+) create mode 100644 playbooks/roles/tor/defaults/main.yaml create mode 100644 playbooks/roles/tor/meta/main.yaml create mode 100644 playbooks/roles/tor/tasks/Apple M1.yml create mode 100644 playbooks/roles/tor/tasks/Darwin.yml create mode 100644 playbooks/roles/tor/tasks/Debian.yml create mode 100644 playbooks/roles/tor/tasks/MacOSX.yml create mode 100644 playbooks/roles/tor/tasks/RedHat.yml create mode 100644 playbooks/roles/tor/tasks/main.yaml create mode 100644 playbooks/roles/tor/vars/main.yaml create mode 100644 playbooks/tor.yml diff --git a/playbooks/roles/tor/defaults/main.yaml b/playbooks/roles/tor/defaults/main.yaml new file mode 100644 index 00000000..dfc4607e --- /dev/null +++ b/playbooks/roles/tor/defaults/main.yaml @@ -0,0 +1,2 @@ +--- +BREW_INSTALL: true \ No newline at end of file diff --git a/playbooks/roles/tor/meta/main.yaml b/playbooks/roles/tor/meta/main.yaml new file mode 100644 index 00000000..697ed6a5 --- /dev/null +++ b/playbooks/roles/tor/meta/main.yaml @@ -0,0 +1,4 @@ +--- +dependencies: + - defaults + - brew \ No newline at end of file diff --git a/playbooks/roles/tor/tasks/Apple M1.yml b/playbooks/roles/tor/tasks/Apple M1.yml new file mode 100644 index 00000000..73b314ff --- /dev/null +++ b/playbooks/roles/tor/tasks/Apple M1.yml @@ -0,0 +1 @@ +--- \ No newline at end of file diff --git a/playbooks/roles/tor/tasks/Darwin.yml b/playbooks/roles/tor/tasks/Darwin.yml new file mode 100644 index 00000000..3e2cbde5 --- /dev/null +++ b/playbooks/roles/tor/tasks/Darwin.yml @@ -0,0 +1,7 @@ +--- +- name: Apple M1 + include_tasks: "{{ansible_facts.processor}}.yml" + when: ansible_facts.processor == "Apple M1" + +- name: "{{ansible_facts.distribution}}" + include_tasks: "{{ansible_facts.distribution}}.yml" \ No newline at end of file diff --git a/playbooks/roles/tor/tasks/Debian.yml b/playbooks/roles/tor/tasks/Debian.yml new file mode 100644 index 00000000..934178d4 --- /dev/null +++ b/playbooks/roles/tor/tasks/Debian.yml @@ -0,0 +1,3 @@ +--- +- apt: update_cache=yes name={{ package }} state=latest + become: yes \ No newline at end of file diff --git a/playbooks/roles/tor/tasks/MacOSX.yml b/playbooks/roles/tor/tasks/MacOSX.yml new file mode 100644 index 00000000..ad756dab --- /dev/null +++ b/playbooks/roles/tor/tasks/MacOSX.yml @@ -0,0 +1,3 @@ +--- +- include_role: name=brew-installer +- include_role: name=mac-installer \ No newline at end of file diff --git a/playbooks/roles/tor/tasks/RedHat.yml b/playbooks/roles/tor/tasks/RedHat.yml new file mode 100644 index 00000000..9404bb7e --- /dev/null +++ b/playbooks/roles/tor/tasks/RedHat.yml @@ -0,0 +1,3 @@ +--- +- yum: name={{ package }} state=latest + become: yes \ No newline at end of file diff --git a/playbooks/roles/tor/tasks/main.yaml b/playbooks/roles/tor/tasks/main.yaml new file mode 100644 index 00000000..a8294e6b --- /dev/null +++ b/playbooks/roles/tor/tasks/main.yaml @@ -0,0 +1,3 @@ +--- +- set_fact: package=tor +- include_tasks: "{{ansible_facts.os_family}}.yml" \ No newline at end of file diff --git a/playbooks/roles/tor/vars/main.yaml b/playbooks/roles/tor/vars/main.yaml new file mode 100644 index 00000000..4af82eb1 --- /dev/null +++ b/playbooks/roles/tor/vars/main.yaml @@ -0,0 +1,9 @@ +--- +url: +mac_deb: +mac_pkg: +mac_zip: +mac_folder: +mac_app: + +BREW_INSTALL: true \ No newline at end of file diff --git a/playbooks/tor.yml b/playbooks/tor.yml new file mode 100644 index 00000000..c37b2df8 --- /dev/null +++ b/playbooks/tor.yml @@ -0,0 +1,4 @@ +--- +- hosts: all + roles: + - tor \ No newline at end of file