]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Reorganizing tasks that debian and ubuntu both need.
authorAndrew Schoen <aschoen@redhat.com>
Fri, 17 Apr 2015 15:33:26 +0000 (10:33 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Fri, 17 Apr 2015 19:14:30 +0000 (14:14 -0500)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/testnode/tasks/apt_systems.yml
roles/testnode/tasks/setup-ubuntu.yml
roles/testnode/tasks/static_ip.yml

index 1cfac7e1880cbb2e0e80cb887aaad2c3ac1db6e5..b0937ddcb736cd82ec6bab8472652d71ab3ebf8d 100644 (file)
@@ -8,3 +8,44 @@
   include: apt/packages.yml
   tags:
     - packages
+
+# This was ported directly from chef.  I was unable to figure out a better way
+# to do this, but it seems to just be adding the user_xattr option to the root filesystem mount.
+# I believe perl was used here initially because the mount resources provided by chef and ansible
+# require both the name (i.e. /) and the source (UUID="<some_uuid>") to ensure it's editing the correct line
+# in /etc/fstab.  This won't work for us because the root file system source (UUID or label) is different depending
+# on the image used to create this node (downburst and cobbler use different images).
+- name: Use perl to add user_xattr to the root mount options in fstab.
+  command:
+    perl -pe 'if (m{^([^#]\S*\s+/\s+\S+\s+)(\S+)(\s+.*)$}) { $_="$1$2,user_xattr$3\n" unless $2=~m{(^|,)user_xattr(,|$)}; }' -i.bak /etc/fstab
+  args:
+    creates: /etc/fstab.bak
+  register: add_user_xattr
+
+- name: Enable xattr for this boot.
+  command:
+    mount -o remount,user_xattr /
+  when: add_user_xattr|changed
+
+- name: Upload /etc/fuse.conf.
+  template:
+    src: fuse.conf
+    dest: /etc/fuse.conf
+    owner: root
+    group: fuse
+    mode: 0644
+
+- name: Add teuthology user to groups fuse, kvm and disk.
+  user:
+    name: "{{ teuthology_user }}"
+    # group sets the primary group, while groups just adds
+    # the user to the specified group or groups.
+    groups: fuse,kvm,disk
+    append: yes
+
+- include: nagios.yml
+  tags:
+    - nagios
+
+- include: static_ip.yml
+  when: "'vps' not in group_names"
index 314873ffded7c3e866f9b0464eff8a62c4ae3fb0..3f2b15c50137cf8ea20eb7e5415584982adc4bc2 100644 (file)
     group: root
     mode: 0755
 
-# This was ported directly from chef.  I was unable to figure out a better way
-# to do this, but it seems to just be adding the user_xattr option to the root filesystem mount.
-# I believe perl was used here initially because the mount resources provided by chef and ansible
-# require both the name (i.e. /) and the source (UUID="<some_uuid>") to ensure it's editing the correct line
-# in /etc/fstab.  This won't work for us because the root file system source (UUID or label) is different depending
-# on the image used to create this node (downburst and cobbler use different images).
-- name: Use perl to add user_xattr to the root mount options in fstab.
-  command:
-    perl -pe 'if (m{^([^#]\S*\s+/\s+\S+\s+)(\S+)(\s+.*)$}) { $_="$1$2,user_xattr$3\n" unless $2=~m{(^|,)user_xattr(,|$)}; }' -i.bak /etc/fstab
-  args:
-    creates: /etc/fstab.bak
-  register: add_user_xattr
-
-- name: Enable xattr for this boot.
-  command:
-    mount -o remount,user_xattr /
-  when: add_user_xattr|changed
-
-- name: Upload /etc/fuse.conf.
-  template:
-    src: fuse.conf
-    dest: /etc/fuse.conf
-    owner: root
-    group: fuse
-    mode: 0644
-
-- name: Add teuthology user to groups fuse, kvm and disk.
-  user:
-    name: "{{ teuthology_user }}"
-    # group sets the primary group, while groups just adds
-    # the user to the specified group or groups.
-    groups: fuse,kvm,disk
-    append: yes
-
 - name: Enable kernel logging to console.
   script: scripts/kernel_logging.sh creates=/kernel-logging-setup
   register: kernel_logging
     - start ttyS2
   when: ansible_hostname | search("^mira*")
 
-- include: nagios.yml
-  tags:
-    - nagios
-
 - name: Enable kernel modules to load at boot time.
   template:
     src: modules
   tags:
     - nfs
 
-# is not run on virtual machines
-- include: static_ip.yml
+# this script was ported directly from chef.
+- name: Set up static IP and 10gig interface.
+  script: scripts/static-ip.sh creates=/static-ip-setup
   when: "'vps' not in group_names"
 
 - name: Upload a lab specific base resolv.conf.
index 28760550680ca2a664deee542a087169d4c2a6ca..005ab0ce32d801f40fb00320b0ec7c1ff8e1b52a 100644 (file)
@@ -6,7 +6,3 @@
     regexp: "^127.0.1.1"
     backrefs: yes
     state: present
-
-# this script was ported directly from chef.
-- name: Set up static IP and 10gig interface.
-  script: scripts/static-ip.sh creates=/static-ip-setup