diff --git a/roles/0-init/tasks/first_run.yml b/roles/0-init/tasks/first_run.yml index 3a8fa2770..332da85b7 100644 --- a/roles/0-init/tasks/first_run.yml +++ b/roles/0-init/tasks/first_run.yml @@ -1,5 +1,2 @@ -- name: Create IIAB directory structure - include_tasks: fl.yml - - name: Create {{ iiab_ini_file }} include_tasks: iiab_ini.yml diff --git a/roles/1-prep/tasks/main.yml b/roles/1-prep/tasks/main.yml index 3b94d84af..418510c90 100644 --- a/roles/1-prep/tasks/main.yml +++ b/roles/1-prep/tasks/main.yml @@ -16,12 +16,6 @@ path: /etc/iiab/uuid register: uuid_file -- name: If not, create folder /etc/iiab - file: - path: /etc/iiab - state: directory - when: not uuid_file.stat.exists - - name: If no uuid exists, create one shell: uuidgen register: uuid_response @@ -48,9 +42,10 @@ # var: ro_dir - name: Does 'ubermix' exist in /etc/lsb-release? - shell: grep -i ubermix /etc/lsb-release + shell: grep -i ubermix /etc/lsb-release # Pipe to cat to avoid red errors? register: grep_ubermix - ignore_errors: true + failed_when: false # Universal way to hide alarmist red errors! + #ignore_errors: true #check_mode: no #- debug: diff --git a/roles/0-init/tasks/fl.yml b/roles/2-common/tasks/fl.yml similarity index 84% rename from roles/0-init/tasks/fl.yml rename to roles/2-common/tasks/fl.yml index 3f9c8c584..3bb1544b1 100644 --- a/roles/0-init/tasks/fl.yml +++ b/roles/2-common/tasks/fl.yml @@ -1,4 +1,4 @@ -- name: Create 21 directories with ownership root:root and permissions 0755 (3 in /etc, 3 in {{ iiab_base }} and 15 in /library) # iiab_base is /opt/iiab +- name: Create 19 directories with ownership root:root and permissions 0755 (1 in /etc, 3 in {{ iiab_base }} and 15 in /library) # iiab_base is /opt/iiab file: path: "{{ item }}" owner: root @@ -6,8 +6,6 @@ mode: 0755 state: directory with_items: - - /etc/iiab - - /etc/sysconfig/olpc-scripts/ - /etc/sysconfig/olpc-scripts/setup.d/installed/ - "{{ yum_packages_dir }}" - "{{ pip_packages_dir }}" diff --git a/roles/2-common/tasks/main.yml b/roles/2-common/tasks/main.yml index 8dad669df..30dbca766 100644 --- a/roles/2-common/tasks/main.yml +++ b/roles/2-common/tasks/main.yml @@ -3,6 +3,9 @@ - name: ...IS BEGINNING ========================================== command: echo +- name: Create IIAB directory structure + include_tasks: fl.yml + - include_tasks: centos.yml when: ansible_distribution == "CentOS"