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"
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.