]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Replaced shell based sed with apt_repo module call 151/head
authorMatthew Rees <matthew.rees@secate.com>
Mon, 17 Nov 2014 10:11:48 +0000 (12:11 +0200)
committerMatthew Rees <matthew.rees@secate.com>
Mon, 17 Nov 2014 10:11:48 +0000 (12:11 +0200)
roles/ceph-radosgw/tasks/install_debian.yml

index 970da1fc4c7809619a67c22b1333627e65886f82..3460a22e4cbfb269af5cb608b9c510e8ea7cdd56 100644 (file)
 
 # Needed for Ubuntu 12.04 to have access to libapache2-mod-fastcgi if 100-continue isn't being used
 - name: Enable multiverse repo for Precise
-  shell: "sed -i '/^# deb .* multiverse$/ s/^# //' /etc/apt/sources.list"
+  apt_repository: >
+    repo="{{ item }}"
+    state=present
+  with_items:
+    - deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }} multiverse
+    - deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-updates multiverse
+    - deb http://security.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-security multiverse
   when: ansible_lsb.codename in ['precise'] and not http_100_continue
 
 # Disable the repo when we are using the Ceph repo for 100-continue packages
 - name: Disable multiverse repo for Precise
-  shell: "sed -i '/^deb .* multiverse$/ s/^/# /' /etc/apt/sources.list"
+  apt_repository: >
+    repo="{{ item }}"
+    state=absent
+  with_items:
+    - deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }} multiverse
+    - deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-updates multiverse
+    - deb http://security.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-security multiverse
   when: ansible_lsb.codename in ['precise'] and http_100_continue
 
 # Needed for Ubuntu 14.04 to have access to libapache2-mod-fastcgi if 100-continue isn't being used