- name: Enable xattr for this boot.
command:
mount -o remount,user_xattr /
- when: add_user_xattr|changed
+ when: add_user_xattr is defined and
+ add_user_xattr|changed
- name: Upload /etc/fuse.conf.
template:
- name: "Install Amazon::S3."
command: "cpan Amazon::S3"
- when: cpan_check.rc != 0
+ when: cpan_check is defined and
+ cpan_check.rc != 0
- name: Remove lab domain from hostname.
shell: hostname | cut -d'.' -f1
register: new_hostname
- when: existing_hostname.stdout.find("{{ lab_domain | mandatory }}") != -1
+ when: existing_hostname is defined and
+ existing_hostname.stdout.find("{{ lab_domain | mandatory }}") != -1
- name: Set hostname.
hostname:
name: "{{ new_hostname.stdout }}"
- when: existing_hostname.stdout.find("{{ lab_domain | mandatory }}") != -1
+ when: existing_hostname is defined and
+ existing_hostname.stdout.find("{{ lab_domain | mandatory }}") != -1
# Install and configure cpan and Amazon::S3
- include: ../cpan.yml
- name: Update /etc/profile if needed.
command:
sed -i 's/\/usr\/games"/\/usr\/games:\/usr\/sbin"/g' /etc/profile
- when: update_profile.rc != 0
+ when: update_profile is defined and
+ update_profile.rc != 0