Last active
April 11, 2020 02:10
-
-
Save rmchale/90108d30b11227ce3a972fbd79ef9e7e to your computer and use it in GitHub Desktop.
ChromeOS application setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Pixel slate apps | |
hosts: localhost | |
become: yes | |
tasks: | |
- shell: lsb_release -cs | |
register: release | |
# install intellij | |
- name: check for intellij | |
shell: test -d /opt/intellij && echo "yes" || echo "no" | |
register: intellij_exists | |
- name: download intellj | |
get_url: | |
url: https://download.jetbrains.com/idea/ideaIU-2020.1.tar.gz | |
dest: /tmp/ideaIU-2020.1.tar.gz | |
mode: '0755' | |
force: yes | |
when: | |
- intellij_exists.stdout == "no" | |
- name: untar intellij | |
shell: tar xzvf /tmp/ideaIU-2020.1.tar.gz -C /opt | |
when: intellij_exists.stdout == "no" | |
- name: link intellij | |
file: src=/opt/idea-IU-201.6668.121 dest=/opt/intellij state=link | |
when: intellij_exists.stdout == "no" | |
- name: create launch entry | |
become_user: root | |
blockinfile: | |
dest: /usr/share/applications/intellj.desktop | |
create: yes | |
block: | | |
[Desktop Entry] | |
Name=Intellij | |
Comment=Intellij IDE | |
Icon=/opt/idea-IU-201.6668.121/bin/idea.png | |
Exec=/opt/idea-IU-201.6668.121/bin/idea.sh %u | |
Type=Application | |
Categories=IDE | |
when: intellij_exists.stdout == "no" | |
# install pycharm | |
- name: check for pycharm | |
shell: test -d /opt/pycharm && echo "yes" || echo "no" | |
register: pycharm_exists | |
- name: check for download | |
shell: test -f /home/v/pycharm.tar.gz && echo "yes" || echo "no" | |
register: pycharm_downloaded | |
when: pycharm_exists.stdout == "no" | |
- name: download pycharm | |
get_url: | |
url: https://download.jetbrains.com/python/pycharm-professional-2019.3.4.tar.gz | |
dest: /tmp/pycharm-professional-2019.3.4.tar.gz | |
mode: '0755' | |
force: yes | |
when: pycharm_exists.stdout == "no" | |
- name: untar pycharm | |
shell: tar xzvf /tmp/pycharm-professional-2019.3.4.tar.gz -C /opt | |
when: pycharm_exists.stdout == "no" | |
- name: link pycharm | |
file: src=/opt/pycharm-2019.3.4 dest=/opt/pycharm state=link | |
when: pycharm_exists.stdout == "no" | |
- name: create launch entry | |
become_user: root | |
blockinfile: | |
dest: /usr/share/applications/pycharm.desktop | |
create: yes | |
block: | | |
[Desktop Entry] | |
Name=Pycharm | |
Comment=Pycharm Python IDE | |
Icon=/opt/pycharm-2019.3.4/bin/pycharm.png | |
Exec=/opt/pycharm-2019.3.4/bin/pycharm.sh %u | |
Type=Application | |
Categories=IDE | |
when: pycharm_exists.stdout == "no" | |
# kubectl | |
- name: check kubectl | |
shell: test -f /usr/local/bin/kubectl && echo "yes" || echo "no" | |
register: kubectl_installed | |
- name: install kubectl | |
shell: | | |
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl | |
chmod +x ./kubectl | |
sudo mv ./kubectl /usr/local/bin/kubectl | |
kubectl version | |
when: kubectl_installed.stdout == "no" | |
# install google-cloud-sdk | |
- name: gcloud code | |
shell: test -f /usr/bin/gcloud && echo "yes" | echo "no" | |
register: gcloud_installed | |
- name: gcp key | |
apt_key: | |
url: https://packages.cloud.google.com/apt/doc/apt-key.gpg | |
state: present | |
when: gcloud_installed.stdout == "no" | |
- name: install gcp repo | |
apt_repository: | |
repo: deb http://packages.cloud.google.com/apt cloud-sdk main | |
state: present | |
when: gcloud_installed.stdout == "no" | |
- name: install gcp sdk | |
apt: | |
name: google-cloud-sdk | |
state: present | |
update_cache: yes | |
when: gcloud_installed.stdout == "no" | |
# install vscode | |
- name: check code | |
shell: test -f /usr/bin/code && echo "yes" | echo "no" | |
register: code_installed | |
- name: ms key | |
apt_key: | |
url: https://packages.microsoft.com/keys/microsoft.asc | |
state: present | |
when: code_installed.stdout == "no" | |
- name: ms repo | |
apt_repository: | |
repo: deb https://packages.microsoft.com/repos/vscode stable main | |
state: present | |
when: code_installed.stdout == "no" | |
- name: install vscode | |
apt: | |
update_cache: yes | |
name: code | |
state: present | |
when: code_installed.stdout == "no" | |
# install docker | |
- name: check docker | |
shell: test -f /usr/bin/docker && echo "yes" || echo "no" | |
register: docker_installed | |
- name: docker key | |
apt_key: | |
url: https://download.docker.com/linux/debian/gpg | |
state: present | |
when: docker_installed.stdout == "no" | |
- name: docker repo | |
apt_repository: | |
repo: deb [arch=amd64] https://download.docker.com/linux/debian {{ release.stdout }} stable | |
state: present | |
when: docker_installed.stdout == "no" | |
- name: install docker | |
apt: | |
update_cache: yes | |
name: docker-ce | |
state: present | |
when: docker_installed.stdout == "no" | |
# python | |
- name: python | |
apt: | |
name: python3-pip | |
state: present | |
# ruby | |
- name: ruby | |
apt: | |
name: ruby-full | |
state: present | |
# terminal | |
- name: terminal | |
apt: | |
name: gnome-terminal | |
state: present | |
- name: tmux | |
apt: | |
name: tmux | |
state: present |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment