summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSrdjan Grubor <sgnn7@sgnn7.org>2014-01-21 19:30:57 -0800
committerSrdjan Grubor <sgnn7@sgnn7.org>2014-01-21 19:30:57 -0800
commitce5a91b83397d581f0e22fc954329cc09e6608bc (patch)
treead5d497f9e6e57159d7b9ef11126f4a8c1dbee55 /tools
parent2b14911667321d895ec3e1b7343fc5dfa85bcfdb (diff)
Cleaned the scripts up to not be split by sudo prefix by using sudo variable per task
[endlessm/eos-sdk#1620]
Diffstat (limited to 'tools')
-rw-r--r--tools/dev_env_setup/playbooks/create_eos_app_shortcuts.yaml10
-rw-r--r--tools/dev_env_setup/playbooks/install_jhbuild_deps.yaml16
-rw-r--r--tools/dev_env_setup/playbooks/jhbuild_run.yaml21
-rw-r--r--tools/dev_env_setup/playbooks/setup_default_ssh_key.yaml5
-rw-r--r--tools/dev_env_setup/playbooks/setup_dev_folder.yaml18
-rw-r--r--tools/dev_env_setup/playbooks/setup_dev_machine.yaml (renamed from tools/dev_env_setup/playbooks/kill_shell.yaml)11
-rw-r--r--tools/dev_env_setup/playbooks/setup_dev_machine_root.yaml22
-rw-r--r--tools/dev_env_setup/playbooks/setup_jhbuild.yaml58
-rwxr-xr-xtools/dev_env_setup/setup_dev_machine.sh7
9 files changed, 79 insertions, 89 deletions
diff --git a/tools/dev_env_setup/playbooks/create_eos_app_shortcuts.yaml b/tools/dev_env_setup/playbooks/create_eos_app_shortcuts.yaml
index f09d21f..3776298 100644
--- a/tools/dev_env_setup/playbooks/create_eos_app_shortcuts.yaml
+++ b/tools/dev_env_setup/playbooks/create_eos_app_shortcuts.yaml
@@ -1,8 +1,16 @@
---
# vim:ff=unix ts=2 sw=2 ai expandtab
+- name: "Setting default personality"
+ shell: executable=/bin/bash eos-select-personality default
+
+- name: "Creating ~/.local/share/applications directory"
+ file: path=~/.local/share/applications state=directory
+ sudo: False
+
- name: "Creating EOS links for various apps"
- shell: cp /usr/share/applications/$item.desktop /usr/share/applications/eos-app-$item.desktop
+ shell: cp /usr/share/applications/$item.desktop ~/.local/share/applications/eos-app-$item.desktop
with_items:
- gnome-terminal
- devhelp
+ sudo: False
diff --git a/tools/dev_env_setup/playbooks/install_jhbuild_deps.yaml b/tools/dev_env_setup/playbooks/install_jhbuild_deps.yaml
index c802950..a8161be 100644
--- a/tools/dev_env_setup/playbooks/install_jhbuild_deps.yaml
+++ b/tools/dev_env_setup/playbooks/install_jhbuild_deps.yaml
@@ -1,16 +1,8 @@
---
# vim:ff=unix ts=2 sw=2 ai expandtab
--
- hosts: dev_machine
- sudo: True
+- name: "Creating /opt/gnome directory"
+file: path=/opt/gnome state=directory mode=777
- vars_files:
- - "../default_variables.yaml"
-
- tasks:
- - name: "Creating /opt/gnome directory"
- file: path=/opt/gnome state=directory mode=777
-
- - name: "Updating apt-file cache"
- shell: apt-file update
+- name: "Updating apt-file cache"
+ shell: apt-file update
diff --git a/tools/dev_env_setup/playbooks/jhbuild_run.yaml b/tools/dev_env_setup/playbooks/jhbuild_run.yaml
index ff9d290..744af74 100644
--- a/tools/dev_env_setup/playbooks/jhbuild_run.yaml
+++ b/tools/dev_env_setup/playbooks/jhbuild_run.yaml
@@ -1,19 +1,14 @@
---
# vim:ff=unix ts=2 sw=2 ai expandtab
--
- hosts: dev_machine
+- name: "Installing jhbuild dependencies - this may take a very long time"
+ shell: executable=/bin/bash echo -e "y\n" | ~/.local/bin/jhbuild sysdeps --install
sudo: False
- vars_files:
- - "../default_variables.yaml"
-
- tasks:
- - name: "Installing jhbuild dependencies - this may take a very long time"
- shell: executable=/bin/bash echo -e "y\n" | ~/.local/bin/jhbuild sysdeps --install
-
- - name: "Installing auth key"
- template: src=../templates/.jhbuildrc-auth.j2 dest=~/.jhbuildrc-auth
+- name: "Installing auth key"
+ template: src=../templates/.jhbuildrc-auth.j2 dest=~/.jhbuildrc-auth
+ sudo: False
- - name: "Cloning relevant modules - this will take a very long time - use htop and watch for git processes"
- shell: executable=/bin/bash ~/.local/bin/jhbuild update endless-apps
+- name: "Cloning relevant modules - this will take a very long time - use htop and watch for git processes"
+ shell: executable=/bin/bash ~/.local/bin/jhbuild update endless-apps
+ sudo: False
diff --git a/tools/dev_env_setup/playbooks/setup_default_ssh_key.yaml b/tools/dev_env_setup/playbooks/setup_default_ssh_key.yaml
index 32434da..32e7cd8 100644
--- a/tools/dev_env_setup/playbooks/setup_default_ssh_key.yaml
+++ b/tools/dev_env_setup/playbooks/setup_default_ssh_key.yaml
@@ -3,12 +3,15 @@
- name: "Creating ssh directory"
file: path=~/.ssh state=directory mode=700
+ sudo: False
- name: "Copying default ssh keys"
- copy: src=../keys/$item dest=~/.ssh/
+ copy: src=../keys/$item dest=~/.ssh/ mode=700
with_items:
- id_rsa
- id_rsa.pub
+ sudo: False
- name: "Adding default known_hosts file"
copy: src=../templates/known_hosts dest=~/.ssh/
+ sudo: False
diff --git a/tools/dev_env_setup/playbooks/setup_dev_folder.yaml b/tools/dev_env_setup/playbooks/setup_dev_folder.yaml
index 950a588..3328f99 100644
--- a/tools/dev_env_setup/playbooks/setup_dev_folder.yaml
+++ b/tools/dev_env_setup/playbooks/setup_dev_folder.yaml
@@ -1,16 +1,12 @@
---
# vim:ff=unix ts=2 sw=2 ai expandtab
--
- hosts: dev_machine
-
+- name: "Copying python file for desktop generation"
+ copy: src=../templates/add_dev_tools_folder.py dest=~/ mode=755
sudo: False
- vars_files:
- - "../default_variables.yaml"
-
- tasks:
- - name: "Copying python file for desktop generation"
- copy: src=../templates/add_dev_tools_folder.py dest=~/ mode=755
+- name: "Creating development tools folder"
+ shell: executable=/bin/bash export DISPLAY=:0; ~/add_dev_tools_folder.py &> ~/add_dev_tools_folder.log
+ sudo: False
- - name: "Creating development tools folder"
- shell: executable=/bin/bash export DISPLAY=:0; ~/add_dev_tools_folder.py &> ~/add_dev_tools_folder.log
+- name: "Setting default personality"
+ service: name=gdm state=restarted
diff --git a/tools/dev_env_setup/playbooks/kill_shell.yaml b/tools/dev_env_setup/playbooks/setup_dev_machine.yaml
index 408caa6..11f0783 100644
--- a/tools/dev_env_setup/playbooks/kill_shell.yaml
+++ b/tools/dev_env_setup/playbooks/setup_dev_machine.yaml
@@ -14,5 +14,12 @@
- "../default_variables.yaml"
tasks:
- - name: "Setting default personality"
- service: name=gdm state=restarted
+ - include: setup_tools_root.yaml
+
+ - include: create_eos_app_shortcuts.yaml
+
+ - include: setup_dev_folder.yaml
+
+ - include: setup_default_ssh_key.yaml
+
+ - include: setup_jhbuild.yaml
diff --git a/tools/dev_env_setup/playbooks/setup_dev_machine_root.yaml b/tools/dev_env_setup/playbooks/setup_dev_machine_root.yaml
deleted file mode 100644
index 41e0c6d..0000000
--- a/tools/dev_env_setup/playbooks/setup_dev_machine_root.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# vim:ff=unix ts=2 sw=2 ai expandtab
-
-###
-# Notice the minus on the line below -- this starts the playbook's record
-# in the YAML document. Only one playbook is allowed per YAML file. Indent
-# the body of the playbook.
--
- hosts: dev_machine
-
- sudo: True
-
- vars_files:
- - "../default_variables.yaml"
-
- tasks:
- - include: playbooks/setup_tools_root.yaml
-
- - include: playbooks/create_eos_app_shortcuts.yaml
-
- - name: "Setting default personality"
- shell: executable=/bin/bash eos-select-personality default
diff --git a/tools/dev_env_setup/playbooks/setup_jhbuild.yaml b/tools/dev_env_setup/playbooks/setup_jhbuild.yaml
index 45a9df7..a8749a6 100644
--- a/tools/dev_env_setup/playbooks/setup_jhbuild.yaml
+++ b/tools/dev_env_setup/playbooks/setup_jhbuild.yaml
@@ -1,34 +1,50 @@
---
# vim:ff=unix ts=2 sw=2 ai expandtab
--
- hosts: dev_machine
+- name: "Ensuring that git is installed"
+ apt: name=git update_cache=true cache_valid_time=259200
+
+- name: "Creating checkout directory"
+ file: path=~/checkout state=directory mode=755
+ sudo: False
+
+- name: "Cloning jhbuild"
+ git: repo=git://git.gnome.org/jhbuild
+ dest=~/checkout/jhbuild
+ sudo: False
+
+- name: "Installing jhbuild - autogen"
+ shell: cd ~/checkout/jhbuild && ./autogen.sh
+ sudo: False
+
+- name: "Installing jhbuild - make"
+ shell: cd ~/checkout/jhbuild && make
sudo: False
- vars_files:
- - "../default_variables.yaml"
+- name: "Installing jhbuild - make install"
+ shell: cd ~/checkout/jhbuild && make install
+ sudo: False
- tasks:
- - name: "Ensuring that git is installed"
- apt: name=git update_cache=true cache_valid_time=259200
+- name: "Creating glib schemas dir"
+ file: path=~/install/share/glib-2.0/schemas state=directory mode=755
+ sudo: False
- - name: "Creating checkout directory"
- file: path=~/checkout state=directory mode=755
- - name: "Cloning jhbuild"
- git: repo=git://git.gnome.org/jhbuild
- dest=~/checkout/jhbuild
+- name: "Creating /opt/gnome directory"
+ file: path=/opt/gnome state=directory mode=777
- - name: "Installing jhbuild - autogen"
- shell: cd ~/checkout/jhbuild && ./autogen.sh
+- name: "Updating apt-file cache"
+ shell: apt-file update
- - name: "Installing jhbuild - make"
- shell: cd ~/checkout/jhbuild && make
- - name: "Installing jhbuild - make install"
- shell: cd ~/checkout/jhbuild && make install
+- name: "Installing jhbuild dependencies - this may take a very long time"
+ shell: executable=/bin/bash echo -e "y\n" | ~/.local/bin/jhbuild sysdeps --install
+ sudo: False
- - name: "Creating glib schemas dir"
- file: path=~/install/share/glib-2.0/schemas state=directory mode=755
+- name: "Installing auth key"
+ template: src=../templates/.jhbuildrc-auth.j2 dest=~/.jhbuildrc-auth
+ sudo: False
- - include: setup_default_ssh_key.yaml
+- name: "Cloning relevant modules - this will take a very long time - use htop and watch for git processes"
+ shell: executable=/bin/bash ~/.local/bin/jhbuild update endless-apps
+ sudo: False
diff --git a/tools/dev_env_setup/setup_dev_machine.sh b/tools/dev_env_setup/setup_dev_machine.sh
index 3e22394..f886748 100755
--- a/tools/dev_env_setup/setup_dev_machine.sh
+++ b/tools/dev_env_setup/setup_dev_machine.sh
@@ -47,11 +47,6 @@ cat << EOF > $tmp_inventory
dev_machine ansible_ssh_host=$TARGET_IP ansible_ssh_user="$TARGET_USER" ansible_sudo_pass="${TARGET_PASS}" ansible_ssh_pass="${TARGET_PASS}" ansible_connection=ssh
EOF
-ansible-playbook -i $tmp_inventory playbooks/setup_dev_machine_root.yaml
-ansible-playbook -i $tmp_inventory playbooks/setup_dev_folder.yaml
-ansible-playbook -i $tmp_inventory playbooks/kill_shell.yaml
-ansible-playbook -i $tmp_inventory playbooks/setup_jhbuild.yaml
-ansible-playbook -i $tmp_inventory playbooks/install_jhbuild_deps.yaml
-ansible-playbook -i $tmp_inventory playbooks/jhbuild_run.yaml --extra-vars "api_key=$API_KEY"
+ansible-playbook -i $tmp_inventory playbooks/setup_dev_machine.yaml --extra-vars "api_key=$API_KEY"
echo "Repos are cloned. You should be able to run 'jhbuild build' on the target"