<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_scan_report(self, role):
 """ Update the role state and adjust the scan totals. """

        state = self.report["state"]

        # ensure the missing meta state is colored up and the ok count is good
        if self.gendoc:
            if self.report["roles"][role]["state"] == "missing_meta":
                return

        if os.path.exists(self.paths["readme"]):
            state["ok_role"] += 1
            self.report["roles"][role]["state"] = "ok"
        else:
            state["missing_readme_role"] += 1
            self.report["roles"][role]["state"] = "missing_readme"