From bd7d1dded57578ef088ea480781f608d960765dc Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 31 Oct 2017 13:02:41 -0500 Subject: [PATCH] move is_rpi to computed_vars.yml for 0-init --- roles/1-prep/tasks/computed_vars.yml | 12 ++++++++---- roles/1-prep/tasks/main.yml | 7 ------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/roles/1-prep/tasks/computed_vars.yml b/roles/1-prep/tasks/computed_vars.yml index 0d5b68dd6..9e4e7fdf4 100644 --- a/roles/1-prep/tasks/computed_vars.yml +++ b/roles/1-prep/tasks/computed_vars.yml @@ -1,7 +1,4 @@ -# get local vars from scripts in /etc/ansible/facts.d -# on first run, this will generate UUID - -- name: re-read facts +- name: re-read local_facts.facts from /etc/ansible/facts.d setup: filter=ansible_local # set top level variables from local facts for convenience @@ -10,6 +7,13 @@ phplib_dir: '{{ ansible_local.local_facts.phplib_dir }}' iiab_stage: '{{ ansible_local.local_facts.stage }}' +# Networking uses a different file for the rpi +- name: Discover if this is a rpi -- assume if so it is running raspbian + set_fact: + rpi_model: "rpi" + is_rpi: "True" + when: ansible_local.local_facts.os == "raspbian" + - name: Set exFAT enabled for XO laptops set_fact: exFAT_enabled: True diff --git a/roles/1-prep/tasks/main.yml b/roles/1-prep/tasks/main.yml index a96e281f6..cff1ba0a7 100644 --- a/roles/1-prep/tasks/main.yml +++ b/roles/1-prep/tasks/main.yml @@ -63,13 +63,6 @@ when: not is_debuntu and selinux_disabled is defined and selinux_disabled.changed ## DISCOVER PLATFORMS ###### -- name: Discover if this is an rpi -- assume it is running Raspbian if so - set_fact: - rpi_model: "rpi" - is_rpi: "True" - when: ansible_local.local_facts.os == "raspbian" - ignore_errors: true - - include_tasks: prep.yml when: first_run