summaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorSrdjan Grubor <sgnn7@sgnn7.org>2014-01-14 15:42:34 -0600
committerSrdjan Grubor <sgnn7@sgnn7.org>2014-01-16 21:46:33 -0600
commitee539057a3e7387b95736dc85bd4d9af5c8e552c (patch)
tree1568461989bbb3785b15119df239fb6f9ac8fa00 /ansible
parent5214ed7a373ef9bea7c2028cbe60e264449da812 (diff)
Added code that can run sudo tasks and install turbine/transifex client
Diffstat (limited to 'ansible')
-rw-r--r--ansible/playbooks/setup_dev_machine_root.yaml17
-rw-r--r--ansible/playbooks/setup_dev_machine_user.yaml (renamed from ansible/playbooks/setup_dev_machine.yaml)0
-rw-r--r--ansible/playbooks/setup_jhbuild.yaml11
-rw-r--r--ansible/playbooks/setup_other_tools.yaml18
-rwxr-xr-xansible/setup_dev_machine.sh5
5 files changed, 46 insertions, 5 deletions
diff --git a/ansible/playbooks/setup_dev_machine_root.yaml b/ansible/playbooks/setup_dev_machine_root.yaml
new file mode 100644
index 0000000..8a6f5df
--- /dev/null
+++ b/ansible/playbooks/setup_dev_machine_root.yaml
@@ -0,0 +1,17 @@
+---
+# 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: setup_other_tools.yaml
diff --git a/ansible/playbooks/setup_dev_machine.yaml b/ansible/playbooks/setup_dev_machine_user.yaml
index 3ffe699..3ffe699 100644
--- a/ansible/playbooks/setup_dev_machine.yaml
+++ b/ansible/playbooks/setup_dev_machine_user.yaml
diff --git a/ansible/playbooks/setup_jhbuild.yaml b/ansible/playbooks/setup_jhbuild.yaml
index 3df6a63..fdbb0c0 100644
--- a/ansible/playbooks/setup_jhbuild.yaml
+++ b/ansible/playbooks/setup_jhbuild.yaml
@@ -3,17 +3,22 @@
- name: "Ensuring that git is installed"
apt: name=git
+
- 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: "Installing jhbuildi - autogen"
+- name: "Installing jhbuild - autogen"
shell: cd ~/checkout/jhbuild && ./autogen.sh
-- name: "Installing jhbuildi - make"
+- name: "Installing jhbuild - make"
shell: cd ~/checkout/jhbuild && make
-- name: "Installing jhbuildi - make install"
+- name: "Installing jhbuild - make install"
shell: cd ~/checkout/jhbuild && make install
+
+- name: "Creating glib schemas dir"
+ file: path=~/install/share/glib-2.0/schemas state=directory mode=755
diff --git a/ansible/playbooks/setup_other_tools.yaml b/ansible/playbooks/setup_other_tools.yaml
new file mode 100644
index 0000000..ef7eec6
--- /dev/null
+++ b/ansible/playbooks/setup_other_tools.yaml
@@ -0,0 +1,18 @@
+---
+# vim:ff=unix ts=2 sw=2 ai expandtab
+
+- name: "Ensuring that git is installed"
+ apt: name=git
+
+- name: "Creating turbine directory"
+ file: path=~/checkout state=directory mode=755
+
+- name: "Cloning turbine"
+ git: repo=git://git.gnome.org/turbine
+ dest=~/checkout/turbine
+
+- name: "Installing turbine"
+ shell: cd ~/checkout/turbine && python setup.py install
+
+- name: "Installing transifex client"
+ shell: pip install transifex-client
diff --git a/ansible/setup_dev_machine.sh b/ansible/setup_dev_machine.sh
index 9387570..dc20084 100755
--- a/ansible/setup_dev_machine.sh
+++ b/ansible/setup_dev_machine.sh
@@ -34,7 +34,8 @@ trap "rm -f $tmp_inventory" EXIT
echo "Creating Ansible inventory file in $tmp_inventory"
cat << EOF > $tmp_inventory
[dev_machine]
-dev_machine ansible_ssh_host=$TARGET_IP ansible_ssh_user="$TARGET_USER" ansible_ssh_pass="${TARGET_PASS}" ansible_connection=ssh
+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.yaml
+ansible-playbook -i $tmp_inventory playbooks/setup_dev_machine_root.yaml
+ansible-playbook -i $tmp_inventory playbooks/setup_dev_machine_user.yaml