]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Setup debian specific things.
authorAndrew Schoen <aschoen@redhat.com>
Fri, 17 Apr 2015 15:42:37 +0000 (10:42 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Fri, 17 Apr 2015 19:28:29 +0000 (14:28 -0500)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/testnode/tasks/main.yml
roles/testnode/tasks/setup-debian.yml [new file with mode: 0644]
roles/testnode/templates/wgetrc [new file with mode: 0644]

index 5113c144b043c4225369f7e0e28f6140a574f0d6..9fe1c2f4e535937a920db61312567222fc79e009 100644 (file)
 - include: setup-ubuntu.yml
   when: ansible_distribution == "Ubuntu"
 
+# configure debian specific things
+- include: setup-debian.yml
+  when: ansible_distribution == "Debian"
+
 # configure ntp
 - include: ntp.yml
   tags:
diff --git a/roles/testnode/tasks/setup-debian.yml b/roles/testnode/tasks/setup-debian.yml
new file mode 100644 (file)
index 0000000..83e0437
--- /dev/null
@@ -0,0 +1,32 @@
+---
+- name: Work around broken wget on wheezy.
+  template:
+    src: wgetrc
+    dest: /etc/wgetrc
+    owner: root
+    group: root
+    mode: 0644
+
+- name: Stop collectl
+  service:
+    name: collectl
+    state: stopped
+
+- name: Add PATH to the teuthology_user .bashrc.
+  lineinfile:
+    dest: "/home/{{ teuthology_user }}/.bashrc"
+    line: "export PATH=$PATH:/usr/sbin"
+    insertbefore: BOF
+    state: present
+
+- name: Check to see if we need to edit /etc/profile.
+  command:
+    grep '/usr/games:/usr/sbin' /etc/profile
+  register: update_profile
+  changed_when: false
+  ignore_errors: true
+
+- name: Update /etc/profile if needed.
+  command:
+    sed -i 's/\/usr\/games"/\/usr\/games:\/usr\/sbin"/g' /etc/profile
+  when: update_profile.rc != 0
diff --git a/roles/testnode/templates/wgetrc b/roles/testnode/templates/wgetrc
new file mode 100644 (file)
index 0000000..e1af6f9
--- /dev/null
@@ -0,0 +1,3 @@
+# {{ ansible_managed }}
+check_certificate = off
+passive_ftp = on